700
|
How can I filter the check-boxes (method 1)

local var_Column as IColumn
local var_Editor as IEditor
local var_Items as IItems
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Check")}
var_Editor := var_Column:Editor
var_Editor:EditType := CheckValueType
var_Editor:[Option,exCheckValue2] := 1
var_Column:DisplayFilterButton := true
var_Column:DisplayFilterPattern := false
var_Column:FilterType := exCheck
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem(true)
var_Items:AddItem(true)
var_Items:AddItem(false)
var_Items:AddItem(true)
var_Items:AddItem(false)
var_Items:AddItem(true)
var_Items:AddItem(false)
|
699
|
How can add a button to control

METHOD OCX_Exontrol1ButtonClick(Item,ColIndex,Key) CLASS MainDialog
// ButtonClick event - Occurs when user clicks on the cell's button.
OutputDebugString(String2Psz( "ButtonClick" ))
OutputDebugString(String2Psz( oDCOCX_Exontrol1:Items:[CellCaption,Item,ColIndex] ))
OutputDebugString(String2Psz( AsString(Key) ))
RETURN NIL
local var_Column,var_Column1 as IColumn
local var_Columns as IColumns
local var_Editor,var_Editor1 as IEditor
local var_Items as IItems
local h,s as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:DefaultItemHeight := 22
oDCOCX_Exontrol1:HeaderHeight := 22
oDCOCX_Exontrol1:Appearance := None2
oDCOCX_Exontrol1:DrawGridLines := exRowLines
oDCOCX_Exontrol1:ScrollBySingleLine := false
oDCOCX_Exontrol1:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oDCOCX_Exontrol1:[HTMLPicture,"pic1"] := "c:\exontrol\images\auction.gif"
var_Columns := oDCOCX_Exontrol1:Columns
var_Column := IColumn{var_Columns:Add("Type")}
var_Column:Width := 48
var_Column:[Def,exCellValueFormat] := 1
var_Column1 := IColumn{var_Columns:Add("Appearance")}
var_Column1:[Def,exCellValueFormat] := 1
var_Column1:Alignment := CenterAlignment
var_Column1:HeaderAlignment := CenterAlignment
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Items.<b>CellHasButton</b> property")
var_Items:[CellValue,h,1] := "Button <b>1</b>"
var_Items:[CellHasButton,h,1] := true
h := var_Items:AddItem("Items.<b>CellButtonAutoWidth</b> property")
var_Items:[CellValue,h,1] := " Button <b>2</b> "
var_Items:[CellHasButton,h,1] := true
var_Items:[CellButtonAutoWidth,h,1] := true
h := var_Items:AddItem("Items.<b>CellHasButton</b> property")
var_Items:[CellValue,h,1] := " <img>2</img>Button <b>3</b> "
var_Items:[CellHasButton,h,1] := true
var_Items:[CellButtonAutoWidth,h,1] := true
h := var_Items:AddItem("Items.<b>CellHasButton</b> property")
var_Items:[ItemHeight,h] := 32
var_Items:[CellValue,h,1] := " <img>2</img>Button <b>4</b> <img>pic1</img> "
var_Items:[CellHasButton,h,1] := true
var_Items:[CellButtonAutoWidth,h,1] := true
h := var_Items:AddItem("Items.<b>CellHasButton</b> in splitted cells")
var_Items:[CellValue,h,1] := " Button <b>5.1</b> "
var_Items:[CellHasButton,h,1] := true
var_Items:[CellButtonAutoWidth,h,1] := true
s := var_Items:[SplitCell,h,1]
var_Items:[CellValue,0,s] := " Button <b>5.2</b> "
var_Items:[CellHasButton,0,s] := true
var_Items:[CellButtonAutoWidth,0,s] := true
h := var_Items:AddItem("Column.<b>Editor</b>, Items.<b>CellEditor</b>")
var_Items:[CellValue,h,1] := "Visible when clicking the cell"
var_Editor := var_Items:[CellEditor,h,1]
var_Editor:EditType := EditType
var_Editor:AddButton("B1",1,0,"This is a bit of text that's shown when the cursor hovers the button B1",nil,nil)
var_Editor:AddButton("B3",2,1,"This is a bit of text that's shown when the cursor hovers the button B3",nil,nil)
var_Editor:AddButton("B4",1,1,"This is a bit of text that's shown when the cursor hovers the button B4",nil,nil)
var_Editor:ButtonWidth := 24
h := var_Items:AddItem("Column.<b>Editor</b>, Items.<b>CellEditor</b>")
var_Items:[CellValue,h,1] := 3
var_Editor1 := var_Items:[CellEditor,h,1]
var_Editor1:EditType := CheckListType
var_Editor1:AddItem(1,"Flag 1",nil)
var_Editor1:AddItem(2,"Flag 2",nil)
var_Editor1:AddItem(4,"Flag 4",nil)
var_Editor1:AddItem(8,"Flag 8",nil)
var_Editor1:AddButton("C1",1,0,"This is a bit of text that's shown when the cursor hovers the button C1",nil,nil)
var_Editor1:AddButton("C3",2,0,"This is a bit of text that's shown when the cursor hovers the button C2",nil,nil)
var_Editor1:AddButton("C4",1,0,"This is a bit of text that's shown when the cursor hovers the button C3",nil,nil)
var_Editor1:ButtonWidth := 24
oDCOCX_Exontrol1:EndUpdate()
|
698
|
The item is not getting selected when clicking the cell's checkbox. What should I do

METHOD OCX_Exontrol1CellStateChanged(Item,ColIndex) CLASS MainDialog
// CellStateChanged event - Fired after cell's state has been changed.
oDCOCX_Exontrol1:Items:[SelectItem,Item] := true
RETURN NIL
local var_Items as IItems
IColumn{oDCOCX_Exontrol1:Columns:Add("Check")}:[Def,exCellHasCheckBox] := true
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem(0)
var_Items:AddItem(1)
var_Items:AddItem(2)
var_Items:AddItem(3)
|
697
|
Is it possible to limit the height of the item while resizing

METHOD OCX_Exontrol1AddItem(Item) CLASS MainDialog
// AddItem event - Occurs after a new Item has been inserted to Items collection.
oDCOCX_Exontrol1:Items:[ItemMinHeight,Item] := 18
oDCOCX_Exontrol1:Items:[ItemMaxHeight,Item] := 72
RETURN NIL
local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ItemsAllowSizing := exResizeItem
oDCOCX_Exontrol1:ScrollBySingleLine := false
oDCOCX_Exontrol1:BackColorAlternate := RGB(240,240,240)
oDCOCX_Exontrol1:Columns:Add("Names")
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem("Mantel")
var_Items:AddItem("Mechanik")
var_Items:AddItem("Motor")
var_Items:AddItem("Murks")
var_Items:AddItem("Märchen")
var_Items:AddItem("Möhren")
var_Items:AddItem("Mühle")
oDCOCX_Exontrol1:Columns:[Item,0]:SortOrder := SortAscending
oDCOCX_Exontrol1:EndUpdate()
|
696
|
Is it possible to copy the hierarchy of the control using the GetItems method

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:Columns:Add("Def")
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Root")
var_Items:InsertItem(h,nil,"Child 1")
var_Items:InsertItem(h,nil,"Child 2")
oDCOCX_Exontrol1:PutItems(oDCOCX_Exontrol1:GetItems(-1),nil)
|
695
|
Is it possible to auto-numbering the children items but still keeps the position after filtering

local var_Column,var_Column1,var_Column2,var_Column3,var_Column4,var_Column5,var_Column6 as IColumn
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Items")}
var_Column:DisplayFilterButton := true
var_Column:FilterType := exFilter
var_Column:Filter := "Child 2"
var_Column1 := IColumn{oDCOCX_Exontrol1:Columns:Add("Pos.1")}
var_Column1:FormatColumn := "1 ropos ''"
var_Column1:Position := 0
var_Column1:Width := 32
var_Column1:AllowSizing := false
var_Column2 := IColumn{oDCOCX_Exontrol1:Columns:Add("Pos.2")}
var_Column2:FormatColumn := "1 ropos ':'"
var_Column2:Position := 1
var_Column2:Width := 32
var_Column2:AllowSizing := false
var_Column3 := IColumn{oDCOCX_Exontrol1:Columns:Add("Pos.3")}
var_Column3:FormatColumn := "1 ropos ':|A-Z'"
var_Column3:Position := 2
var_Column3:Width := 32
var_Column3:AllowSizing := false
var_Column4 := IColumn{oDCOCX_Exontrol1:Columns:Add("Pos.4")}
var_Column4:FormatColumn := "1 ropos '|A-Z|'"
var_Column4:Position := 3
var_Column4:Width := 32
var_Column4:AllowSizing := false
var_Column5 := IColumn{oDCOCX_Exontrol1:Columns:Add("Pos.5")}
var_Column5:FormatColumn := "'<font Tahoma;7>' + 1 ropos '-<b>||A-Z'"
var_Column5:[Def,exCellValueFormat] := 1
var_Column5:Position := 4
var_Column5:Width := 32
var_Column5:AllowSizing := false
var_Column6 := IColumn{oDCOCX_Exontrol1:Columns:Add("Pos.6")}
var_Column6:FormatColumn := "'<b>'+ 1 ropos '</b>:<fgcolor=FF0000>|A-Z|'"
var_Column6:[Def,exCellValueFormat] := 1
var_Column6:Position := 5
var_Column6:Width := 48
var_Column6:AllowSizing := false
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Root 1")
var_Items:InsertItem(h,nil,"Child 1")
var_Items:InsertItem(h,nil,"Child 2")
var_Items:[ExpandItem,h] := true
h := var_Items:AddItem("Root 2")
var_Items:InsertItem(h,nil,"Child 1")
var_Items:InsertItem(h,nil,"Child 2")
oDCOCX_Exontrol1:ApplyFilter()
oDCOCX_Exontrol1:EndUpdate()
|
694
|
Is it possible to auto-numbering the children items too

local var_Column,var_Column1,var_Column2,var_Column3,var_Column4,var_Column5 as IColumn
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:Columns:Add("Items")
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Pos.1")}
var_Column:FormatColumn := "1 rpos ''"
var_Column:Position := 0
var_Column:Width := 32
var_Column:AllowSizing := false
var_Column1 := IColumn{oDCOCX_Exontrol1:Columns:Add("Pos.2")}
var_Column1:FormatColumn := "1 rpos ':'"
var_Column1:Position := 1
var_Column1:Width := 32
var_Column1:AllowSizing := false
var_Column2 := IColumn{oDCOCX_Exontrol1:Columns:Add("Pos.3")}
var_Column2:FormatColumn := "1 rpos ':|A-Z'"
var_Column2:Position := 2
var_Column2:Width := 32
var_Column2:AllowSizing := false
var_Column3 := IColumn{oDCOCX_Exontrol1:Columns:Add("Pos.4")}
var_Column3:FormatColumn := "1 rpos '|A-Z|'"
var_Column3:Position := 3
var_Column3:Width := 32
var_Column3:AllowSizing := false
var_Column4 := IColumn{oDCOCX_Exontrol1:Columns:Add("Pos.5")}
var_Column4:FormatColumn := "'<font Tahoma;7>' + 1 rpos '-<b>||A-Z'"
var_Column4:[Def,exCellValueFormat] := 1
var_Column4:Position := 4
var_Column4:Width := 32
var_Column4:AllowSizing := false
var_Column5 := IColumn{oDCOCX_Exontrol1:Columns:Add("Pos.6")}
var_Column5:FormatColumn := "'<b>'+ 1 rpos '</b>:<fgcolor=FF0000>|A-Z|'"
var_Column5:[Def,exCellValueFormat] := 1
var_Column5:Position := 5
var_Column5:Width := 48
var_Column5:AllowSizing := false
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Root 1")
var_Items:InsertItem(h,nil,"Child 1")
var_Items:InsertItem(h,nil,"Child 2")
var_Items:[ExpandItem,h] := true
h := var_Items:AddItem("Root 2")
var_Items:InsertItem(h,nil,"Child 1")
var_Items:InsertItem(h,nil,"Child 2")
oDCOCX_Exontrol1:EndUpdate()
|
693
|
Is it possible to cancel or discard the values during validation

METHOD OCX_Exontrol1ValidateValue(Item,ColIndex,NewValue,Cancel) CLASS MainDialog
// ValidateValue event - Occurs before user changes the cell's value.
OutputDebugString(String2Psz( "ValidateValue" ))
OutputDebugString(String2Psz( AsString(NewValue) ))
OutputDebugString(String2Psz( "Change the Cancel parameter for ValidateValue event to accept/decline the newly value. " ))
OutputDebugString(String2Psz( "The DiscardValidateValue restores back the previously values." ))
oDCOCX_Exontrol1:DiscardValidateValue()
RETURN NIL
local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:CauseValidateValue := exValidateCell
IColumn{oDCOCX_Exontrol1:Columns:Add("Date")}:Editor:EditType := DateType
IColumn{oDCOCX_Exontrol1:Columns:Add("Text")}:Editor:EditType := EditType
var_Items := oDCOCX_Exontrol1:Items
var_Items:[CellValue,var_Items:AddItem(SToD("20010101")),1] := "text"
var_Items:[CellValue,var_Items:AddItem(SToD("20010101")),1] := "text"
var_Items:[CellValue,var_Items:AddItem(SToD("20010101")),1] := "text"
var_Items:[CellValue,var_Items:AddItem(SToD("20010101")),1] := "text"
var_Items:[CellValue,var_Items:AddItem(SToD("20010101")),1] := "text"
oDCOCX_Exontrol1:EndUpdate()
|
692
|
Is it possible to validate the values of the cells only when user leaves the focused item
METHOD OCX_Exontrol1ValidateValue(Item,ColIndex,NewValue,Cancel) CLASS MainDialog
// ValidateValue event - Occurs before user changes the cell's value.
OutputDebugString(String2Psz( "ValidateValue" ))
OutputDebugString(String2Psz( AsString(NewValue) ))
OutputDebugString(String2Psz( "Change the Cancel parameter for ValidateValue event to accept/decline the newly value. " ))
Cancel := true
OutputDebugString(String2Psz( "You can not leave the item/record until the Cancel is False." ))
RETURN NIL
local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:CauseValidateValue := exValidateItem
IColumn{oDCOCX_Exontrol1:Columns:Add("Date")}:Editor:EditType := DateType
IColumn{oDCOCX_Exontrol1:Columns:Add("Text")}:Editor:EditType := EditType
var_Items := oDCOCX_Exontrol1:Items
var_Items:[CellValue,var_Items:AddItem(SToD("20010101")),1] := "text"
var_Items:[CellValue,var_Items:AddItem(SToD("20010101")),1] := "text"
var_Items:[CellValue,var_Items:AddItem(SToD("20010101")),1] := "text"
var_Items:[CellValue,var_Items:AddItem(SToD("20010101")),1] := "text"
var_Items:[CellValue,var_Items:AddItem(SToD("20010101")),1] := "text"
oDCOCX_Exontrol1:EndUpdate()
|
691
|
We would like to validate the values of the cells. Is it possible

METHOD OCX_Exontrol1ValidateValue(Item,ColIndex,NewValue,Cancel) CLASS MainDialog
// ValidateValue event - Occurs before user changes the cell's value.
OutputDebugString(String2Psz( "ValidateValue" ))
OutputDebugString(String2Psz( AsString(NewValue) ))
OutputDebugString(String2Psz( "Change the Cancel parameter for ValidateValue event to accept/decline the newly value." ))
Cancel := true
OutputDebugString(String2Psz( "You can not leave the cell until the Cancel is False." ))
RETURN NIL
local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:CauseValidateValue := exValidateCell
IColumn{oDCOCX_Exontrol1:Columns:Add("Date")}:Editor:EditType := DateType
IColumn{oDCOCX_Exontrol1:Columns:Add("Text")}:Editor:EditType := EditType
var_Items := oDCOCX_Exontrol1:Items
var_Items:[CellValue,var_Items:AddItem(SToD("20010101")),1] := "text"
var_Items:[CellValue,var_Items:AddItem(SToD("20010101")),1] := "text"
var_Items:[CellValue,var_Items:AddItem(SToD("20010101")),1] := "text"
var_Items:[CellValue,var_Items:AddItem(SToD("20010101")),1] := "text"
var_Items:[CellValue,var_Items:AddItem(SToD("20010101")),1] := "text"
oDCOCX_Exontrol1:EndUpdate()
|
690
|
Is there any way to add auto-numbering

local var_Column as IColumn
local var_Columns as IColumns
local var_Items as IItems
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("Items")
var_Column := IColumn{var_Columns:Add("Pos")}
var_Column:FormatColumn := "1 pos ''"
var_Column:Position := 0
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem("Item 1")
var_Items:AddItem("Item 2")
var_Items:AddItem("Item 3")
|
689
|
Does your control supports multiple lines tooltip

oDCOCX_Exontrol1:[HTMLPicture,"pic1"] := "c:\exontrol\images\zipdisk.gif"
oDCOCX_Exontrol1:ToolTipDelay := 1
IColumn{oDCOCX_Exontrol1:Columns:Add("tootip")}:ToolTip := "<br><font Tahoma;10>This</font> is a <b>multi-lines</b> tooltip assigned to a column. The tooltip supports built-in HTML tags, icons and pictures.<br><br><br><img>pic1</img> picture ... <br><br>"
|
688
|
How can I prevent highlighting the column from the cursor - point

oDCOCX_Exontrol1:VisualAppearance:Add(1,"gBFLBCJwBAEHhEJAEGg4BI0IQAAYAQGKIYBkAKBQAGaAoDDUOQzQwAAxDKKUEwsACEIrjKCYVgOHYYRrIMYgBCMJhLEoaZLhEZRQiqDYtRDFQBSDDcPw/EaRZohGaYJgEgI=")
oDCOCX_Exontrol1:[Background,exCursorHoverColumn] := 0x1000000
IColumn{oDCOCX_Exontrol1:Columns:Add("S")}:Width := 32
IColumn{oDCOCX_Exontrol1:Columns:Add("Level 1")}:LevelKey := 1
IColumn{oDCOCX_Exontrol1:Columns:Add("Level 2")}:LevelKey := 1
IColumn{oDCOCX_Exontrol1:Columns:Add("Level 3")}:LevelKey := 1
IColumn{oDCOCX_Exontrol1:Columns:Add("E1")}:Width := 32
IColumn{oDCOCX_Exontrol1:Columns:Add("E2")}:Width := 32
IColumn{oDCOCX_Exontrol1:Columns:Add("E3")}:Width := 32
IColumn{oDCOCX_Exontrol1:Columns:Add("E4")}:Width := 32
|
687
|
Is it possible display numbers in the same format no matter of regional settings in the control panel

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
IColumn{oDCOCX_Exontrol1:Columns:Add("Def")}:[Def,exCellValueFormat] := 1
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem(100000.27)
var_Items:[FormatCell,h,0] := "(value format '') + ' <fgcolor=808080>(default positive)'"
h := var_Items:AddItem(100000.27)
var_Items:[FormatCell,h,0] := "(value format '2|.|3|,|1|1')"
h := var_Items:AddItem(-100000.27)
var_Items:[FormatCell,h,0] := "(value format '') + ' <fgcolor=808080>(default negative)'"
h := var_Items:AddItem(-100000.27)
var_Items:[FormatCell,h,0] := "(value format '2|.|3|,|1|1')"
oDCOCX_Exontrol1:EndUpdate()
|
686
|
Is it possible to add a 0 for numbers less than 1 instead .7 to show 0.8

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
IColumn{oDCOCX_Exontrol1:Columns:Add("Def")}:[Def,exCellValueFormat] := 1
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem(0.27)
var_Items:[FormatCell,h,0] := "(value format '') + ' <fgcolor=808080>(default)'"
h := var_Items:AddItem(0.27)
var_Items:[FormatCell,h,0] := "(value format '|||||0') + ' <fgcolor=808080>(Display no leading zeros)'"
oDCOCX_Exontrol1:EndUpdate()
|
685
|
How can I specify the format for negative numbers

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
IColumn{oDCOCX_Exontrol1:Columns:Add("Def")}:[Def,exCellValueFormat] := 1
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem(-100000.27)
var_Items:[FormatCell,h,0] := "(value format '') + ' <fgcolor=808080>(default)'"
h := var_Items:AddItem(-100000.27)
var_Items:[FormatCell,h,0] := "(value format '||||1') + ' <fgcolor=808080>(Negative sign, number; for example, -1.1)'"
oDCOCX_Exontrol1:EndUpdate()
|
684
|
Is it possible to change the grouping character when display numbers

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
IColumn{oDCOCX_Exontrol1:Columns:Add("Def")}:[Def,exCellValueFormat] := 1
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem(100000.27)
var_Items:[FormatCell,h,0] := "(value format '') + ' <fgcolor=808080>(default)'"
h := var_Items:AddItem(100000.27)
var_Items:[FormatCell,h,0] := "(value format '|||-') + ' <fgcolor=808080>(grouping character is -)'"
oDCOCX_Exontrol1:EndUpdate()
|
683
|
How can I display numbers with 2 digits in each group

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
IColumn{oDCOCX_Exontrol1:Columns:Add("Def")}:[Def,exCellValueFormat] := 1
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem(100000.27)
var_Items:[FormatCell,h,0] := "(value format '') + ' <fgcolor=808080>(default)'"
h := var_Items:AddItem(100000.27)
var_Items:[FormatCell,h,0] := "(value format '||2') + ' <fgcolor=808080>(grouping by 2 digits)'"
oDCOCX_Exontrol1:EndUpdate()
|
682
|
How can I display my numbers using a different decimal separator

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
IColumn{oDCOCX_Exontrol1:Columns:Add("Def")}:[Def,exCellValueFormat] := 1
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem(100.27)
var_Items:[FormatCell,h,0] := "(value format '') + ' <fgcolor=808080>(default)'"
h := var_Items:AddItem(100.27)
var_Items:[FormatCell,h,0] := "(value format '|;') + ' <fgcolor=808080>(decimal separator is <b>;</b>)'"
oDCOCX_Exontrol1:EndUpdate()
|
681
|
Is it possible to display the numbers using 3 (three) digits

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
IColumn{oDCOCX_Exontrol1:Columns:Add("Def")}:[Def,exCellValueFormat] := 1
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem(100.27)
var_Items:[FormatCell,h,0] := "(value format '') + ' <fgcolor=808080>(default)'"
h := var_Items:AddItem(100.27)
var_Items:[FormatCell,h,0] := "(value format '3') + ' <fgcolor=808080>(3 digits)'"
h := var_Items:AddItem(100.27)
var_Items:[FormatCell,h,0] := "(value format 2) + ' <fgcolor=808080>(2 digits)'"
h := var_Items:AddItem(100.27)
var_Items:[FormatCell,h,0] := "(value format 1) + ' <fgcolor=808080>(1 digit)'"
oDCOCX_Exontrol1:EndUpdate()
|
680
|
Is there any option to show the tooltip programmatically

METHOD OCX_Exontrol1MouseMove(Button,Shift,X,Y) CLASS MainDialog
// MouseMove event - Occurs when the user moves the mouse.
oDCOCX_Exontrol1:ShowToolTip(AsString(oDCOCX_Exontrol1:[ItemFromPoint,-1,-1,c,hit]),"","8","8",nil)
RETURN NIL
local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("Def")
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem("Item 1")
var_Items:AddItem("Item 2")
var_Items:AddItem("Item 3")
oDCOCX_Exontrol1:EndUpdate()
|
679
|
How can I specify the column's width to be the same for all columns

local var_Columns as IColumns
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("A")
var_Columns:Add("B")
var_Columns:Add("C")
oDCOCX_Exontrol1:DrawGridLines := exAllLines
oDCOCX_Exontrol1:ColumnAutoResize := true
|
678
|
How can I set the column's width to my desired width

local var_Columns as IColumns
oDCOCX_Exontrol1:ColumnAutoResize := false
var_Columns := oDCOCX_Exontrol1:Columns
IColumn{var_Columns:Add("A")}:Width := 128
IColumn{var_Columns:Add("B")}:Width := 128
oDCOCX_Exontrol1:DrawGridLines := exAllLines
|
677
|
Is it possible to format numbers

local var_Column,var_Column1,var_Column2,var_Column3 as IColumn
local var_Columns as IColumns
local var_Items as IItems
local h,h1 as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:MarkSearchColumn := false
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("Name")
var_Column := IColumn{var_Columns:Add("A")}
var_Column:SortType := SortNumeric
var_Column:AllowSizing := false
var_Column:Width := 36
var_Column:FormatColumn := "len(value) ? value + ' +'"
var_Column:Editor:EditType := SpinType
var_Column1 := IColumn{var_Columns:Add("B")}
var_Column1:SortType := SortNumeric
var_Column1:AllowSizing := false
var_Column1:Width := 36
var_Column1:FormatColumn := "len(value) ? value + ' +'"
var_Column1:Editor:EditType := SpinType
var_Column2 := IColumn{var_Columns:Add("C")}
var_Column2:SortType := SortNumeric
var_Column2:AllowSizing := false
var_Column2:Width := 36
var_Column2:FormatColumn := "len(value) ? value + ' ='"
var_Column2:Editor:EditType := SpinType
var_Column3 := IColumn{var_Columns:Add("A+B+C")}
var_Column3:SortType := SortNumeric
var_Column3:Width := 64
var_Column3:ComputedField := "dbl(%1)+dbl(%2)+dbl(%3)"
var_Column3:FormatColumn := "type(value) in (0,1) ? 'null' : ( dbl(value)<0 ? '<fgcolor=FF0000>'+ (value format '2|.|3|,|1' ) : (dbl(value)>0 ? '<fgcolor=0000FF>+'+(value format '2|.|3|,' ): '0.00') )"
var_Column3:[Def,exCellValueFormat] := 1
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Root")
var_Items:[CellValueFormat,h,4] := exComputedField
h1 := var_Items:InsertItem(h,nil,"Child 1")
var_Items:[CellValue,h1,1] := 7
var_Items:[CellValue,h1,2] := 3
var_Items:[CellValue,h1,3] := 1
h1 := var_Items:InsertItem(h,nil,"Child 2")
var_Items:[CellValue,h1,1] := -2
var_Items:[CellValue,h1,2] := -2
var_Items:[CellValue,h1,3] := -4
h1 := var_Items:InsertItem(h,nil,"Child 3")
var_Items:[CellValue,h1,1] := 2
var_Items:[CellValue,h1,2] := 2
var_Items:[CellValue,h1,3] := -4
var_Items:[ExpandItem,h] := true
oDCOCX_Exontrol1:EndUpdate()
|
676
|
How can I collapse all items

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:Columns:Add("Items")
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Root 1")
var_Items:InsertItem(h,nil,"Child 1")
var_Items:InsertItem(h,nil,"Child 2")
h := var_Items:AddItem("Root 2")
var_Items:InsertItem(h,nil,"Child 1")
var_Items:InsertItem(h,nil,"Child 2")
var_Items:[ExpandItem,0] := false
oDCOCX_Exontrol1:EndUpdate()
|
675
|
How can I expand all items

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:Columns:Add("Items")
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Root 1")
var_Items:InsertItem(h,nil,"Child 1")
var_Items:InsertItem(h,nil,"Child 2")
h := var_Items:AddItem("Root 2")
var_Items:InsertItem(h,nil,"Child 1")
var_Items:InsertItem(h,nil,"Child 2")
var_Items:[ExpandItem,0] := true
oDCOCX_Exontrol1:EndUpdate()
|
674
|
Can I display a total field without having to add a child item

local var_Column as IColumn
local var_Editor as IEditor
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Numbers")}
var_Column:SortType := SortNumeric
var_Editor := var_Column:Editor
var_Editor:EditType := SpinType
var_Editor:Numeric := exFloat
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem(1)
var_Items:AddItem(2)
var_Items:AddItem(3)
var_Items:AddItem(4)
var_Items:[LockedItemCount,exBottom] := 1
h := var_Items:[LockedItem,exBottom,0]
var_Items:[CellValue,h,0] := "sum(all,dir,dbl(%0))"
var_Items:[SortableItem,h] := false
var_Items:[CellValueFormat,h,0] := exTotalField
var_Items:[CellHAlignment,h,0] := RightAlignment
var_Items:[FormatCell,h,0] := "'SUM: '+value"
oDCOCX_Exontrol1:EndUpdate()
|
673
|
Can I display the number of child items

local var_Items as IItems
local h,hx as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exGroupLinesAtRoot
oDCOCX_Exontrol1:Columns:Add("")
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Root 1")
hx := var_Items:[SplitCell,h,0]
var_Items:[CellValue,0,hx] := "count(current,dir,1)"
var_Items:[CellValueFormat,0,hx] := exTotalField
var_Items:[FormatCell,0,hx] := "'Childs: ' + value"
var_Items:InsertItem(h,nil,"Child 1")
var_Items:InsertItem(h,nil,"Child 2")
var_Items:[ExpandItem,h] := true
h := var_Items:AddItem("Root 2")
hx := var_Items:[SplitCell,h,0]
var_Items:[CellValue,0,hx] := "count(current,dir,1)"
var_Items:[CellValueFormat,0,hx] := exTotalField
var_Items:[FormatCell,0,hx] := "'Childs: ' + value"
var_Items:InsertItem(h,nil,"Child 1")
var_Items:InsertItem(h,nil,"Child 2")
var_Items:InsertItem(h,nil,"Child 3")
var_Items:InsertItem(h,nil,"Child 4")
oDCOCX_Exontrol1:EndUpdate()
|
672
|
My field does not display the correctly computed value if I enter data using the control's editors ( concatenation of strings ). What am I doing wrong

local var_Editor,var_Editor1 as IEditor
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("T")
var_Editor := IColumn{oDCOCX_Exontrol1:Columns:Add("A")}:Editor
var_Editor:Numeric := exInteger
var_Editor:EditType := SpinType
var_Editor1 := IColumn{oDCOCX_Exontrol1:Columns:Add("B")}:Editor
var_Editor1:Numeric := exInteger
var_Editor1:EditType := SpinType
oDCOCX_Exontrol1:Columns:Add("A+B")
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Incorrect")
var_Items:[CellToolTip,h,0] := "Just type a number in the column A or B. The result will be concaternated"
var_Items:[CellValue,h,1] := "10"
var_Items:[CellValue,h,2] := "20"
var_Items:[CellValue,h,3] := "currency(%1+%2)"
var_Items:[CellValueFormat,h,3] := exComputedField
h := var_Items:AddItem("Correct")
var_Items:[CellValue,h,1] := 10
var_Items:[CellValue,h,2] := 20
var_Items:[CellValue,h,3] := "currency(dbl(%1)+dbl(%2))"
var_Items:[CellValueFormat,h,3] := exComputedField
oDCOCX_Exontrol1:EndUpdate()
|
671
|
The CellValue/CellCaption property gets the result of a computed/total field with text formatting. Is it possible to get that value without text formatting

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
IColumn{oDCOCX_Exontrol1:Columns:Add("A")}:Editor:EditType := SpinType
IColumn{oDCOCX_Exontrol1:Columns:Add("B")}:Editor:EditType := SpinType
oDCOCX_Exontrol1:Columns:Add("A+B")
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem(10)
var_Items:[CellValue,h,1] := 20
var_Items:[CellValueFormat,h,2] := exComputedField
var_Items:[CellValue,h,2] := "currency(dbl(%0)+dbl(%1))"
OutputDebugString(String2Psz( "CellCaption returns " ))
OutputDebugString(String2Psz( var_Items:[CellCaption,h,2] ))
OutputDebugString(String2Psz( "CellValue returns " ))
OutputDebugString(String2Psz( AsString(var_Items:[CellValue,h,2]) ))
OutputDebugString(String2Psz( "ComputeValue returns " ))
OutputDebugString(String2Psz( AsString(var_Items:[ComputeValue,"dbl(%0)+dbl(%1)",h,0,var_Items:[CellValueFormat,h,2]]) ))
oDCOCX_Exontrol1:EndUpdate()
|
670
|
Can I get the result of a specified formula as your control does using the ComputedField property
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("A")
oDCOCX_Exontrol1:Columns:Add("B")
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem(10)
var_Items:[CellValue,h,1] := 20
OutputDebugString(String2Psz( "A+B is " ))
OutputDebugString(String2Psz( AsString(var_Items:[ComputeValue,"dbl(%0)+dbl(%1)",h,0,2]) ))
oDCOCX_Exontrol1:EndUpdate()
|
669
|
Is it possible to get the text without HTML formatting

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("")
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("<b>bold</b>")
OutputDebugString(String2Psz( AsString(var_Items:[ComputeValue,var_Items:[CellValue,h,0],h,0,1]) ))
oDCOCX_Exontrol1:EndUpdate()
|
668
|
Can I specify an item to be a separator

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:TreeColumnIndex := -1
oDCOCX_Exontrol1:SortOnClick := exNoSort
oDCOCX_Exontrol1:Columns:Add("Numbers")
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem(1)
var_Items:AddItem(2)
h := var_Items:AddItem("separator")
var_Items:[SelectableItem,h] := false
var_Items:[ItemDivider,h] := 0
var_Items:[ItemDividerLineAlignment,h] := DividerCenter
var_Items:[ItemDividerLine,h] := ThinLine
var_Items:[CellHAlignment,h,0] := CenterAlignment
var_Items:AddItem(3)
var_Items:AddItem(4)
oDCOCX_Exontrol1:EndUpdate()
|
667
|
How can I count only non-zero values

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
IColumn{oDCOCX_Exontrol1:Columns:Add("Numbers")}:SortType := SortNumeric
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem(1)
var_Items:AddItem(2)
var_Items:AddItem(0)
var_Items:AddItem(0)
var_Items:AddItem(0)
var_Items:AddItem(0)
var_Items:AddItem(3)
var_Items:AddItem(4)
h := var_Items:AddItem("sum(all,dir,dbl(%0)?1:0)")
var_Items:[SortableItem,h] := false
var_Items:[CellValueFormat,h,0] := exTotalField
var_Items:[CellHAlignment,h,0] := RightAlignment
var_Items:[FormatCell,h,0] := "'COUNT non-zero: '+value"
oDCOCX_Exontrol1:EndUpdate()
|
666
|
How can I add a AVG ( average ) field

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
IColumn{oDCOCX_Exontrol1:Columns:Add("Numbers")}:SortType := SortNumeric
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem(1)
var_Items:AddItem(2)
var_Items:AddItem(3)
var_Items:AddItem(4)
h := var_Items:AddItem("avg(all,dir,dbl(%0))")
var_Items:[SortableItem,h] := false
var_Items:[CellValueFormat,h,0] := exTotalField
var_Items:[CellHAlignment,h,0] := RightAlignment
var_Items:[FormatCell,h,0] := "'AVG: '+value"
oDCOCX_Exontrol1:EndUpdate()
|
665
|
How can I add a COUNT field

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
IColumn{oDCOCX_Exontrol1:Columns:Add("Numbers")}:SortType := SortNumeric
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem(1)
var_Items:AddItem(2)
var_Items:AddItem(3)
var_Items:AddItem(4)
h := var_Items:AddItem("count(all,dir,0)")
var_Items:[SortableItem,h] := false
var_Items:[CellValueFormat,h,0] := exTotalField
var_Items:[CellHAlignment,h,0] := RightAlignment
var_Items:[FormatCell,h,0] := "'COUNT: '+value"
oDCOCX_Exontrol1:EndUpdate()
|
664
|
How can I add a MAX field

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
IColumn{oDCOCX_Exontrol1:Columns:Add("Numbers")}:SortType := SortNumeric
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem(1)
var_Items:AddItem(2)
var_Items:AddItem(3)
var_Items:AddItem(4)
h := var_Items:AddItem("max(all,dir,dbl(%0))")
var_Items:[SortableItem,h] := false
var_Items:[CellValueFormat,h,0] := exTotalField
var_Items:[CellHAlignment,h,0] := RightAlignment
var_Items:[FormatCell,h,0] := "'MAX: '+value"
oDCOCX_Exontrol1:EndUpdate()
|
663
|
How can I add a MIN or MAX field (for numbers)

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
IColumn{oDCOCX_Exontrol1:Columns:Add("Numbers")}:SortType := SortNumeric
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem(11)
var_Items:AddItem(21)
var_Items:AddItem(3)
var_Items:AddItem(4)
h := var_Items:AddItem("min(all,dir,dbl(%0))")
var_Items:[SortableItem,h] := false
var_Items:[CellValueFormat,h,0] := exTotalField
var_Items:[CellHAlignment,h,0] := RightAlignment
var_Items:[FormatCell,h,0] := "'MIN: '+value"
h := var_Items:AddItem("max(all,dir,dbl(%0))")
var_Items:[SortableItem,h] := false
var_Items:[CellValueFormat,h,0] := exTotalField
var_Items:[CellHAlignment,h,0] := RightAlignment
var_Items:[FormatCell,h,0] := "'MAX: '+value"
oDCOCX_Exontrol1:EndUpdate()
|
662
|
How can I add a SUM field

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
IColumn{oDCOCX_Exontrol1:Columns:Add("Numbers")}:SortType := SortNumeric
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem(1)
var_Items:AddItem(2)
var_Items:AddItem(3)
var_Items:AddItem(4)
h := var_Items:AddItem("sum(all,dir,dbl(%0))")
var_Items:[SortableItem,h] := false
var_Items:[CellValueFormat,h,0] := exTotalField
var_Items:[CellHAlignment,h,0] := RightAlignment
var_Items:[FormatCell,h,0] := "'SUM: '+value"
oDCOCX_Exontrol1:EndUpdate()
|
661
|
How can I add total and subtotals fields

METHOD OCX_Exontrol1Change(Item,ColIndex,NewValue) CLASS MainDialog
// Change event - Occurs when the user changes the cell's content.
oDCOCX_Exontrol1:Refresh()
RETURN NIL
local var_Column as IColumn
local var_Editor as IEditor
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exGroupLinesAtRoot
oDCOCX_Exontrol1:Columns:Add("Members")
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Values")}
var_Column:FormatColumn := "currency(value)"
var_Editor := var_Column:Editor
var_Editor:EditType := SpinType
var_Editor:Numeric := exInteger
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Group 1")
var_Items:[ItemBold,h] := true
var_Items:[CellEditorVisible,h,1] := exEditorHidden
var_Items:[CellValue,h,1] := "sum(current,dir,dbl(%1))"
var_Items:[CellValueFormat,h,1] := exTotalField | exHTML
var_Items:[CellHAlignment,h,1] := RightAlignment
var_Items:[CellValue,var_Items:InsertItem(h,nil,"Child 1"),1] := 10
var_Items:[CellValue,var_Items:InsertItem(h,nil,"Child 2"),1] := 20
var_Items:[CellValue,var_Items:InsertItem(h,nil,"Child 3"),1] := 30
var_Items:[ExpandItem,h] := true
h := var_Items:AddItem("Group 2")
var_Items:[ItemBold,h] := true
var_Items:[CellEditorVisible,h,1] := exEditorHidden
var_Items:[CellValue,h,1] := "sum(current,dir,dbl(%1))"
var_Items:[CellValueFormat,h,1] := exTotalField | exHTML
var_Items:[CellHAlignment,h,1] := RightAlignment
var_Items:[CellValue,var_Items:InsertItem(h,nil,"Child 1"),1] := 5
var_Items:[CellValue,var_Items:InsertItem(h,nil,"Child 2"),1] := 15
var_Items:[CellValue,var_Items:InsertItem(h,nil,"Child 3"),1] := 35
h := var_Items:AddItem("total")
var_Items:[CellValue,h,1] := "sum(all,rec,dbl(%1))"
var_Items:[CellValueFormat,h,1] := exTotalField | exHTML
var_Items:[CellEditorVisible,h,1] := exEditorHidden
var_Items:[FormatCell,h,1] := "'Total: <b>' + currency(value)"
var_Items:[CellHAlignment,h,1] := RightAlignment
var_Items:[ItemDivider,h] := 1
var_Items:[ItemDividerLineAlignment,h] := DividerCenter
var_Items:[ItemDividerLine,h] := DoubleLine
var_Items:[SortableItem,h] := false
oDCOCX_Exontrol1:EndUpdate()
|
660
|
Is is possible to have subtotal items, and a grand total item

METHOD OCX_Exontrol1Change(Item,ColIndex,NewValue) CLASS MainDialog
// Change event - Occurs when the user changes the cell's content.
oDCOCX_Exontrol1:Refresh()
RETURN NIL
local var_Column as IColumn
local var_Editor as IEditor
local var_Items as IItems
local h,hT as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:BackColor := RGB(255,255,255)
oDCOCX_Exontrol1:LinesAtRoot := exGroupLinesAtRoot
oDCOCX_Exontrol1:ShowFocusRect := false
oDCOCX_Exontrol1:Columns:Add("Members")
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Values")}
var_Column:FormatColumn := "currency(value)"
var_Editor := var_Column:Editor
var_Editor:EditType := SpinType
var_Editor:Numeric := exInteger
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Group 1")
var_Items:[ItemBold,h] := true
var_Items:[SortableItem,h] := false
var_Items:[CellEditorVisible,h,1] := exEditorHidden
var_Items:[FormatCell,h,1] := " "
var_Items:[CellValue,var_Items:InsertItem(h,nil,"Child 1"),1] := 10
var_Items:[CellValue,var_Items:InsertItem(h,nil,"Child 2"),1] := 20
var_Items:[CellValue,var_Items:InsertItem(h,nil,"Child 3"),1] := 30
hT := var_Items:InsertItem(h,nil,"subtotal")
var_Items:[CellHAlignment,hT,1] := RightAlignment
var_Items:[CellEditorVisible,hT,1] := exEditorHidden
var_Items:[CellValue,hT,1] := "sum(parent,dir,dbl(%1))"
var_Items:[CellValueFormat,hT,1] := exTotalField | exHTML
var_Items:[FormatCell,hT,1] := "'subtotal: <b>' + currency(value)"
var_Items:[ItemDivider,hT] := 1
var_Items:[ItemDividerLineAlignment,hT] := DividerCenter
var_Items:[SortableItem,hT] := false
var_Items:[SelectableItem,hT] := false
var_Items:[ItemDividerLine,hT] := DotLine
var_Items:[ExpandItem,h] := true
h := var_Items:AddItem("Group 2")
var_Items:[ItemBold,h] := true
var_Items:[SortableItem,h] := false
var_Items:[FormatCell,h,1] := " "
var_Items:[CellEditorVisible,h,1] := exEditorHidden
var_Items:[CellValue,var_Items:InsertItem(h,nil,"Child 1"),1] := 15
var_Items:[CellValue,var_Items:InsertItem(h,nil,"Child 2"),1] := 25
var_Items:[CellValue,var_Items:InsertItem(h,nil,"Child 3"),1] := 18
hT := var_Items:InsertItem(h,nil,"subtotal")
var_Items:[CellHAlignment,hT,1] := RightAlignment
var_Items:[CellEditorVisible,hT,1] := exEditorHidden
var_Items:[CellValue,hT,1] := "sum(parent,dir,dbl(%1))"
var_Items:[CellValueFormat,hT,1] := exTotalField | exHTML
var_Items:[FormatCell,hT,1] := "'subtotal: <b>' + currency(value)"
var_Items:[ItemDivider,hT] := 1
var_Items:[ItemDividerLineAlignment,hT] := DividerCenter
var_Items:[ItemDividerLine,hT] := DotLine
var_Items:[SortableItem,hT] := false
var_Items:[SelectableItem,hT] := false
var_Items:[ExpandItem,h] := true
h := var_Items:AddItem("total")
var_Items:[CellValue,h,1] := "sum(all,rec,dbl(%1))"
var_Items:[CellValueFormat,h,1] := exTotalField | exHTML
var_Items:[CellEditorVisible,h,1] := exEditorHidden
var_Items:[FormatCell,h,1] := "'Total: <b><font ;11>' + currency(value)"
var_Items:[CellHAlignment,h,1] := CenterAlignment
var_Items:[ItemDivider,h] := 1
var_Items:[ItemDividerLineAlignment,h] := DividerCenter
var_Items:[ItemDividerLine,h] := DoubleLine
var_Items:[SortableItem,h] := false
var_Items:[SelectableItem,h] := false
oDCOCX_Exontrol1:EndUpdate()
|
659
|
Is it possible to have a total field for each column

METHOD OCX_Exontrol1Change(Item,ColIndex,NewValue) CLASS MainDialog
// Change event - Occurs when the user changes the cell's content.
oDCOCX_Exontrol1:Refresh()
RETURN NIL
local var_Column,var_Column1 as IColumn
local var_Editor,var_Editor1 as IEditor
local var_Items,var_Items1 as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("C1")}
var_Editor := var_Column:Editor
var_Editor:Numeric := exInteger
var_Editor:EditType := SpinType
var_Column:SortType := SortNumeric
var_Column1 := IColumn{oDCOCX_Exontrol1:Columns:Add("C2")}
var_Editor1 := var_Column1:Editor
var_Editor1:Numeric := exInteger
var_Editor1:EditType := SpinType
var_Column1:SortType := SortNumeric
var_Items := oDCOCX_Exontrol1:Items
var_Items:[LockedItemCount,exBottom] := 1
h := var_Items:[LockedItem,exBottom,0]
var_Items:[ItemBackColor,h] := RGB(240,240,240)
var_Items:[ItemBold,h] := true
var_Items:[CellValue,h,0] := "sum(all,dir,dbl(%0))"
var_Items:[CellValueFormat,h,0] := exTotalField
var_Items:[CellValue,h,1] := "sum(all,dir,dbl(%1))"
var_Items:[CellValueFormat,h,1] := exTotalField
var_Items1 := oDCOCX_Exontrol1:Items
var_Items1:[CellValue,var_Items1:AddItem(10),1] := 12
var_Items1:[CellValue,var_Items1:AddItem(25),1] := 5
var_Items1:[CellValue,var_Items1:AddItem(31),1] := 17
var_Items1:[CellValue,var_Items1:AddItem(48),1] := 22
oDCOCX_Exontrol1:EndUpdate()
|
658
|
How can I add a total field for a DataSource being used

METHOD OCX_Exontrol1Change(Item,ColIndex,NewValue) CLASS MainDialog
// Change event - Occurs when the user changes the cell's content.
oDCOCX_Exontrol1:Refresh()
RETURN NIL
local var_Items as IItems
local h as USUAL
local rs as _Recordset
oDCOCX_Exontrol1:ColumnAutoResize := false
oDCOCX_Exontrol1:ContinueColumnScroll := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
var_Items := oDCOCX_Exontrol1:Items
var_Items:[LockedItemCount,exTop] := 1
h := var_Items:[LockedItem,exTop,0]
var_Items:[ItemDivider,h] := 0
var_Items:[CellValueFormat,h,0] := exTotalField | exHTML
var_Items:[CellValue,h,0] := "sum(all,dir,%1)"
|
657
|
How can I add a total field

METHOD OCX_Exontrol1Change(Item,ColIndex,NewValue) CLASS MainDialog
// Change event - Occurs when the user changes the cell's content.
oDCOCX_Exontrol1:Refresh()
RETURN NIL
local var_Column as IColumn
local var_Editor as IEditor
local var_Items,var_Items1 as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Numbers")}
var_Editor := var_Column:Editor
var_Editor:Numeric := exInteger
var_Editor:EditType := SpinType
var_Column:SortType := SortNumeric
var_Items := oDCOCX_Exontrol1:Items
var_Items:[LockedItemCount,exTop] := 1
h := var_Items:[LockedItem,exTop,0]
var_Items:[ItemBackColor,h] := RGB(240,240,240)
var_Items:[CellValue,h,0] := "sum(all,dir,dbl(%0))"
var_Items:[CellValueFormat,h,0] := exTotalField
var_Items:[CellHAlignment,h,0] := RightAlignment
var_Items:[FormatCell,h,0] := "'Total: '+value"
var_Items1 := oDCOCX_Exontrol1:Items
var_Items1:AddItem(10)
var_Items1:AddItem(25)
var_Items1:AddItem(31)
var_Items1:AddItem(48)
oDCOCX_Exontrol1:EndUpdate()
|
656
|
How can I add a total field

METHOD OCX_Exontrol1Change(Item,ColIndex,NewValue) CLASS MainDialog
// Change event - Occurs when the user changes the cell's content.
oDCOCX_Exontrol1:Refresh()
RETURN NIL
local var_Editor as IEditor
local var_Items as IItems
local h,hT as USUAL
oDCOCX_Exontrol1:BeginUpdate()
var_Editor := IColumn{oDCOCX_Exontrol1:Columns:Add("Items")}:Editor
var_Editor:EditType := SpinType
var_Editor:Numeric := exInteger
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Group 1")
var_Items:[CellEditorVisible,h,0] := exEditorHidden
var_Items:InsertItem(h,nil,10)
var_Items:InsertItem(h,nil,20)
var_Items:InsertItem(h,nil,30)
hT := var_Items:InsertItem(h,nil,"sum(parent,dir,dbl(%0))")
var_Items:[CellEditorVisible,hT,0] := exEditorHidden
var_Items:[CellValueFormat,hT,0] := exTotalField | exHTML
var_Items:[ItemDivider,hT] := 0
var_Items:[ItemDividerLineAlignment,hT] := DividerTop
var_Items:[SelectableItem,hT] := false
var_Items:[SortableItem,hT] := false
var_Items:[ExpandItem,h] := true
oDCOCX_Exontrol1:EndUpdate()
|
655
|
Is it possible to specify the cell's value but still want to display some formatted text instead the value

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("Value")
oDCOCX_Exontrol1:Columns:Add("FormatCell")
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem(1)
var_Items:[CellValue,h,1] := 12
var_Items:[FormatCell,h,1] := "currency(value)"
h := var_Items:AddItem(SToD("20010101"))
var_Items:[CellValue,h,1] := SToD("20010101")
var_Items:[CellValueFormat,h,1] := exHTML
var_Items:[FormatCell,h,1] := "longdate(value) replace '2001' with '<b>2001</b>'"
oDCOCX_Exontrol1:EndUpdate()
|
654
|
How can I simulate displaying groups

local var_Columns as IColumns
local var_Items as IItems
local h,h1 as USUAL
oDCOCX_Exontrol1:HasLines := exNoLine
oDCOCX_Exontrol1:ScrollBySingleLine := true
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("Name")
var_Columns:Add("A")
var_Columns:Add("B")
var_Columns:Add("C")
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Group 1")
var_Items:[CellHAlignment,h,0] := CenterAlignment
var_Items:[ItemDivider,h] := 0
var_Items:[ItemDividerLineAlignment,h] := DividerBoth
var_Items:[ItemHeight,h] := 24
var_Items:[SortableItem,h] := false
h1 := var_Items:InsertItem(h,nil,"Child 1")
var_Items:[CellValue,h1,1] := 1
var_Items:[CellValue,h1,2] := 2
var_Items:[CellValue,h1,3] := 3
h1 := var_Items:InsertItem(h,nil,"Child 2")
var_Items:[CellValue,h1,1] := 4
var_Items:[CellValue,h1,2] := 5
var_Items:[CellValue,h1,3] := 6
var_Items:[ExpandItem,h] := true
h := var_Items:AddItem("Group 2")
var_Items:[CellHAlignment,h,0] := CenterAlignment
var_Items:[ItemDivider,h] := 0
var_Items:[ItemDividerLineAlignment,h] := DividerBoth
var_Items:[ItemHeight,h] := 24
var_Items:[SortableItem,h] := false
h1 := var_Items:InsertItem(h,nil,"Child 1")
var_Items:[CellValue,h1,1] := 1
var_Items:[CellValue,h1,2] := 2
var_Items:[CellValue,h1,3] := 3
h1 := var_Items:InsertItem(h,nil,"Child 2")
var_Items:[CellValue,h1,1] := 4
var_Items:[CellValue,h1,2] := 5
var_Items:[CellValue,h1,3] := 6
var_Items:[ExpandItem,h] := true
|
653
|
Is it possible to specify the cell's value but still want to display some formatted text instead the value

local var_Column as IColumn
local var_Columns as IColumns
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:MarkSearchColumn := false
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("Name")
var_Column := IColumn{var_Columns:Add("Values")}
var_Column:SortType := SortNumeric
var_Column:AllowSizing := false
var_Column:Width := 64
var_Column:FormatColumn := "((0:=dbl(value)) < 10? '<fgcolor=808080><font ;7>' :'<b>') + currency(=:0)"
var_Column:[Def,exCellValueFormat] := 1
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Root")
var_Items:[FormatCell,h,1] := "'<none>'"
var_Items:[CellValue,var_Items:InsertItem(h,nil,"Child 1"),1] := 10
var_Items:[CellValue,var_Items:InsertItem(h,nil,"Child 2"),1] := 15
var_Items:[CellValue,var_Items:InsertItem(h,nil,"Child 3"),1] := 25
var_Items:[ExpandItem,h] := true
oDCOCX_Exontrol1:EndUpdate()
|
652
|
I am using the FormatColumn to display the current currency, but would like hide some values. Is it possible

local var_Column as IColumn
local var_Columns as IColumns
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:MarkSearchColumn := false
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("Name")
var_Column := IColumn{var_Columns:Add("Values")}
var_Column:SortType := SortNumeric
var_Column:AllowSizing := false
var_Column:Width := 64
var_Column:FormatColumn := "((0:=dbl(value)) < 10? '<fgcolor=808080><font ;7>' :'<b>') + currency(=:0)"
var_Column:[Def,exCellValueFormat] := 1
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Root")
var_Items:[FormatCell,h,1] := " "
var_Items:[CellValue,var_Items:InsertItem(h,nil,"Child 1"),1] := 10
var_Items:[CellValue,var_Items:InsertItem(h,nil,"Child 2"),1] := 15
var_Items:[CellValue,var_Items:InsertItem(h,nil,"Child 3"),1] := 25
var_Items:[ExpandItem,h] := true
oDCOCX_Exontrol1:EndUpdate()
|
651
|
How can I specify an item to be always the first item

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:TreeColumnIndex := -1
IColumn{oDCOCX_Exontrol1:Columns:Add("Numbers")}:SortType := SortNumeric
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem(1)
var_Items:AddItem(2)
var_Items:AddItem(3)
var_Items:AddItem(4)
h := var_Items:AddItem("first")
var_Items:[ItemPosition,h] := 0
var_Items:[CellHAlignment,h,0] := RightAlignment
var_Items:[SortableItem,h] := false
var_Items:SortChildren(0,0,false)
oDCOCX_Exontrol1:EndUpdate()
|
650
|
How can I specify an item to be always the last item

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:TreeColumnIndex := -1
IColumn{oDCOCX_Exontrol1:Columns:Add("Numbers")}:SortType := SortNumeric
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem(1)
var_Items:AddItem(2)
var_Items:AddItem(3)
var_Items:AddItem(4)
h := var_Items:AddItem("last")
var_Items:[CellHAlignment,h,0] := RightAlignment
var_Items:[SortableItem,h] := false
var_Items:SortChildren(0,0,true)
oDCOCX_Exontrol1:EndUpdate()
|
649
|
Can I allow sorting only the child items

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("Childs")
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Root 1")
var_Items:[SortableItem,h] := false
var_Items:InsertItem(h,nil,"Child 1")
var_Items:InsertItem(h,nil,"Child 2")
var_Items:[ExpandItem,h] := true
h := var_Items:AddItem("Root 2")
var_Items:[SortableItem,h] := false
var_Items:InsertItem(h,nil,"Child 1")
var_Items:InsertItem(h,nil,"Child 2")
var_Items:[ExpandItem,h] := true
oDCOCX_Exontrol1:EndUpdate()
|
648
|
Can I specify a terminal item so it will mark the end of childs

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ScrollBySingleLine := true
oDCOCX_Exontrol1:Columns:Add("P1")
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Root 1")
var_Items:InsertItem(h,nil,"Child 1")
var_Items:InsertItem(h,nil,"Child 2")
var_Items:[ExpandItem,h] := true
h := var_Items:InsertItem(h,"","")
var_Items:[ItemDivider,h] := 0
var_Items:[ItemDividerLineAlignment,h] := DividerCenter
var_Items:[ItemHeight,h] := 2
var_Items:[SelectableItem,h] := false
var_Items:[SortableItem,h] := false
h := var_Items:AddItem("Root 2")
var_Items:InsertItem(h,nil,"Child 1")
var_Items:InsertItem(h,nil,"Child 2")
var_Items:[ExpandItem,h] := true
h := var_Items:InsertItem(h,"","")
var_Items:[ItemDivider,h] := 0
var_Items:[ItemDividerLineAlignment,h] := DividerCenter
var_Items:[ItemHeight,h] := 2
var_Items:[SelectableItem,h] := false
var_Items:[SortableItem,h] := false
oDCOCX_Exontrol1:EndUpdate()
|
647
|
Is it possible to specify an item being unsortable so its position won't be changed after sorting

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:TreeColumnIndex := -1
IColumn{oDCOCX_Exontrol1:Columns:Add("Numbers")}:SortType := SortNumeric
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem(1)
var_Items:AddItem(2)
var_Items:AddItem(3)
var_Items:AddItem(4)
h := var_Items:AddItem("top 3")
var_Items:[ItemPosition,h] := 3
var_Items:[CellHAlignment,h,0] := RightAlignment
var_Items:[SortableItem,h] := false
var_Items:SortChildren(0,0,false)
oDCOCX_Exontrol1:EndUpdate()
|
646
|
Is it possible to move an item from a parent to another

local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:Columns:Add("Items")
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem("A")
var_Items:AddItem("B")
var_Items:InsertItem(var_Items:AddItem("C"),"","D")
var_Items:SetParent(var_Items:[FindItem,"D",0,nil],var_Items:[FindItem,"A",0,nil])
oDCOCX_Exontrol1:EndUpdate()
|
645
|
How can I change the identation for an item

local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:Columns:Add("Items")
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem("A")
var_Items:AddItem("B")
var_Items:InsertItem(var_Items:AddItem("C"),"","D")
var_Items:SetParent(var_Items:[FindItem,"D",0,nil],0)
oDCOCX_Exontrol1:EndUpdate()
|
644
|
How can I arrange the control's header on multiple levels

local var_Column,var_Column1 as IColumn
local var_Columns as IColumns
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:DefaultItemHeight := 48
var_Columns := oDCOCX_Exontrol1:Columns
IColumn{var_Columns:Add("Title")}:Visible := false
IColumn{var_Columns:Add("FirstName")}:Visible := false
IColumn{var_Columns:Add("LastName")}:Visible := false
IColumn{var_Columns:Add("Photo")}:Visible := false
var_Column := IColumn{var_Columns:Add("Address")}
var_Column:Visible := false
var_Column:[Def,exCellSingleLine] := false
var_Column1 := IColumn{var_Columns:Add("Personal Info")}
var_Column1:FormatLevel := "3:48,(0/1/2),4:96"
var_Column1:[Def,exCellFormatLevel] := "3:48,(0/1/2),4:96"
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Sales Representative")
var_Items:[CellValue,h,1] := "Nancy"
var_Items:[CellValue,h,2] := "Davolio"
// Generate Source for 'OLE Automation(stdole2.tlb)' server from Tools\Automation Server... with the PREFIX std
var_Items:[CellPicture,h,3] := oDCOCX_Exontrol1:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")
var_Items:[CellValue,h,4] := "507-20th Ave. E.Apt. 2A"
oDCOCX_Exontrol1:EndUpdate()
|
643
|
How can I filter programatically using more columns

local var_Column,var_Column1 as IColumn
local var_Columns as IColumns
local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("Car")
var_Columns:Add("Equipment")
var_Items := oDCOCX_Exontrol1:Items
var_Items:[CellValue,var_Items:AddItem("Mazda"),1] := "Air Bag"
var_Items:[CellValue,var_Items:AddItem("Toyota"),1] := "Air Bag,Air condition"
var_Items:[CellValue,var_Items:AddItem("Ford"),1] := "Air condition"
var_Items:[CellValue,var_Items:AddItem("Nissan"),1] := "Air Bag,ABS,ESP"
var_Items:[CellValue,var_Items:AddItem("Mazda"),1] := "Air Bag, ABS,ESP"
var_Items:[CellValue,var_Items:AddItem("Mazda"),1] := "ABS,ESP"
var_Column := oDCOCX_Exontrol1:Columns:[Item,"Car"]
var_Column:FilterType := exFilter
var_Column:Filter := "Mazda"
var_Column1 := oDCOCX_Exontrol1:Columns:[Item,"Equipment"]
var_Column1:FilterType := exPattern
var_Column1:Filter := "*ABS*|*ESP*"
oDCOCX_Exontrol1:ApplyFilter()
oDCOCX_Exontrol1:EndUpdate()
|
642
|
How can I show the ticks for a single slider field

local var_Editor as IEditor
local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
IColumn{oDCOCX_Exontrol1:Columns:Add("Slider")}:Editor:EditType := SliderType
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem(10)
var_Editor := var_Items:[CellEditor,var_Items:AddItem(20),0]
var_Editor:EditType := SliderType
var_Editor:[Option,exSliderTickFrequency] := 10
var_Items:AddItem(30)
oDCOCX_Exontrol1:EndUpdate()
|
641
|
Is it possible to show ticks for slider fields

local var_Editor as IEditor
var_Editor := IColumn{oDCOCX_Exontrol1:Columns:Add("Slider")}:Editor
var_Editor:EditType := SliderType
var_Editor:[Option,exSliderTickFrequency] := 10
oDCOCX_Exontrol1:Items:AddItem(10)
|
640
|
Is it possible to colour a particular column, I mean the cell's foreground color

local var_Columns as IColumns
local var_ConditionalFormat as IConditionalFormat
local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
var_ConditionalFormat := oDCOCX_Exontrol1:ConditionalFormats:Add("1",nil)
var_ConditionalFormat:ForeColor := RGB(255,0,0)
var_ConditionalFormat:ApplyTo := 0x1 |
oDCOCX_Exontrol1:MarkSearchColumn := false
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("Column 1")
var_Columns:Add("Column 2")
var_Items := oDCOCX_Exontrol1:Items
var_Items:[CellValue,var_Items:AddItem(0),1] := 1
var_Items:[CellValue,var_Items:AddItem(2),1] := 3
var_Items:[CellValue,var_Items:AddItem(4),1] := 5
oDCOCX_Exontrol1:EndUpdate()
|
639
|
Is it possible to colour a particular column for specified values

local var_Columns as IColumns
local var_ConditionalFormat as IConditionalFormat
local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
var_ConditionalFormat := oDCOCX_Exontrol1:ConditionalFormats:Add("int(%1) in (3,4,5)",nil)
var_ConditionalFormat:BackColor := RGB(255,0,0)
var_ConditionalFormat:ApplyTo := 0x1 |
oDCOCX_Exontrol1:MarkSearchColumn := false
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("Column 1")
var_Columns:Add("Column 2")
var_Items := oDCOCX_Exontrol1:Items
var_Items:[CellValue,var_Items:AddItem(0),1] := 1
var_Items:[CellValue,var_Items:AddItem(2),1] := 3
var_Items:[CellValue,var_Items:AddItem(4),1] := 5
oDCOCX_Exontrol1:EndUpdate()
|
638
|
Is it possible to colour a particular column

local var_Columns as IColumns
local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:MarkSearchColumn := false
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("Column 1")
IColumn{var_Columns:Add("Column 2")}:[Def,exCellBackColor] := 255
var_Items := oDCOCX_Exontrol1:Items
var_Items:[CellValue,var_Items:AddItem(0),1] := 1
var_Items:[CellValue,var_Items:AddItem(2),1] := 3
var_Items:[CellValue,var_Items:AddItem(4),1] := 5
oDCOCX_Exontrol1:EndUpdate()
|
637
|
How do i get all the children items that are under a certain parent Item handle
local var_Items,var_Items1 as IItems
local h,hChild as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:Columns:Add("P")
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Root")
var_Items:InsertItem(h,nil,"Child 1")
var_Items:InsertItem(h,nil,"Child 2")
var_Items:[ExpandItem,h] := true
var_Items1 := oDCOCX_Exontrol1:Items
hChild := var_Items1:[ItemChild,var_Items1:FirstVisibleItem]
OutputDebugString(String2Psz( AsString(var_Items1:[CellValue,hChild,0]) ))
OutputDebugString(String2Psz( AsString(var_Items1:[CellValue,var_Items1:[NextSiblingItem,hChild],0]) ))
oDCOCX_Exontrol1:EndUpdate()
|
636
|
Is is possible to use HTML tags to display in the filter caption

local var_Items as IItems
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:FilterBarPromptVisible := exFilterBarPromptVisible
oDCOCX_Exontrol1:FilterBarCaption := "This is a bit of text being displayed in the filter bar."
oDCOCX_Exontrol1:Columns:Add("")
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem("Item 1")
var_Items:AddItem("Item 2")
var_Items:AddItem("Item 3")
oDCOCX_Exontrol1:EndUpdate()
|
635
|
How can I find the number of items after filtering
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("")
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("")
var_Items:[CellValue,h,0] := var_Items:VisibleItemCount
oDCOCX_Exontrol1:EndUpdate()
|
634
|
How can I change the filter caption

local var_Columns as IColumns
local var_Items as IItems
local h0 as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := true
oDCOCX_Exontrol1:ContinueColumnScroll := false
oDCOCX_Exontrol1:FocusColumnIndex := 1
oDCOCX_Exontrol1:MarkSearchColumn := false
oDCOCX_Exontrol1:SearchColumnIndex := 1
oDCOCX_Exontrol1:FilterBarPromptVisible := exFilterBarPromptVisible
oDCOCX_Exontrol1:FilterBarPromptType := exFilterPromptWords | exFilterPromptContainsAll
oDCOCX_Exontrol1:FilterBarPromptPattern := "london robert"
oDCOCX_Exontrol1:FilterBarCaption := "<r>Found: ... "
var_Columns := oDCOCX_Exontrol1:Columns
IColumn{var_Columns:Add("Name")}:Width := 96
IColumn{var_Columns:Add("Title")}:Width := 96
var_Columns:Add("City")
var_Items := oDCOCX_Exontrol1:Items
h0 := var_Items:AddItem("Nancy Davolio")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Andrew Fuller")
var_Items:[CellValue,h0,1] := "Vice President, Sales"
var_Items:[CellValue,h0,2] := "Tacoma"
var_Items:[SelectItem,h0] := true
h0 := var_Items:AddItem("Janet Leverling")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Kirkland"
h0 := var_Items:AddItem("Margaret Peacock")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Redmond"
h0 := var_Items:AddItem("Steven Buchanan")
var_Items:[CellValue,h0,1] := "Sales Manager"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Michael Suyama")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Robert King")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Laura Callahan")
var_Items:[CellValue,h0,1] := "Inside Sales Coordinator"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Anne Dodsworth")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
oDCOCX_Exontrol1:EndUpdate()
|
633
|
While using the filter prompt is it is possible to use wild characters

local var_Columns as IColumns
local var_Items as IItems
local h0 as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := true
oDCOCX_Exontrol1:ContinueColumnScroll := false
oDCOCX_Exontrol1:FocusColumnIndex := 1
oDCOCX_Exontrol1:MarkSearchColumn := false
oDCOCX_Exontrol1:SearchColumnIndex := 1
oDCOCX_Exontrol1:FilterBarPromptVisible := exFilterBarPromptVisible
oDCOCX_Exontrol1:FilterBarPromptType := exFilterPromptPattern
oDCOCX_Exontrol1:FilterBarPromptPattern := "lon* seat*"
var_Columns := oDCOCX_Exontrol1:Columns
IColumn{var_Columns:Add("Name")}:Width := 96
IColumn{var_Columns:Add("Title")}:Width := 96
var_Columns:Add("City")
var_Items := oDCOCX_Exontrol1:Items
h0 := var_Items:AddItem("Nancy Davolio")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Andrew Fuller")
var_Items:[CellValue,h0,1] := "Vice President, Sales"
var_Items:[CellValue,h0,2] := "Tacoma"
var_Items:[SelectItem,h0] := true
h0 := var_Items:AddItem("Janet Leverling")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Kirkland"
h0 := var_Items:AddItem("Margaret Peacock")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Redmond"
h0 := var_Items:AddItem("Steven Buchanan")
var_Items:[CellValue,h0,1] := "Sales Manager"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Michael Suyama")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Robert King")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Laura Callahan")
var_Items:[CellValue,h0,1] := "Inside Sales Coordinator"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Anne Dodsworth")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
oDCOCX_Exontrol1:EndUpdate()
|
632
|
How can I list all items that contains any of specified words, not necessary at the beggining

local var_Columns as IColumns
local var_Items as IItems
local h0 as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := true
oDCOCX_Exontrol1:ContinueColumnScroll := false
oDCOCX_Exontrol1:FocusColumnIndex := 1
oDCOCX_Exontrol1:MarkSearchColumn := false
oDCOCX_Exontrol1:SearchColumnIndex := 1
oDCOCX_Exontrol1:FilterBarPromptVisible := exFilterBarPromptVisible
oDCOCX_Exontrol1:FilterBarPromptType := exFilterPromptStartWords | exFilterPromptContainsAny
oDCOCX_Exontrol1:FilterBarPromptPattern := "london davolio"
var_Columns := oDCOCX_Exontrol1:Columns
IColumn{var_Columns:Add("Name")}:Width := 96
IColumn{var_Columns:Add("Title")}:Width := 96
var_Columns:Add("City")
var_Items := oDCOCX_Exontrol1:Items
h0 := var_Items:AddItem("Nancy Davolio")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Andrew Fuller")
var_Items:[CellValue,h0,1] := "Vice President, Sales"
var_Items:[CellValue,h0,2] := "Tacoma"
var_Items:[SelectItem,h0] := true
h0 := var_Items:AddItem("Janet Leverling")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Kirkland"
h0 := var_Items:AddItem("Margaret Peacock")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Redmond"
h0 := var_Items:AddItem("Steven Buchanan")
var_Items:[CellValue,h0,1] := "Sales Manager"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Michael Suyama")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Robert King")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Laura Callahan")
var_Items:[CellValue,h0,1] := "Inside Sales Coordinator"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Anne Dodsworth")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
oDCOCX_Exontrol1:EndUpdate()
|
631
|
How can I list all items that contains any of specified words, not strings

local var_Columns as IColumns
local var_Items as IItems
local h0 as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := true
oDCOCX_Exontrol1:ContinueColumnScroll := false
oDCOCX_Exontrol1:FocusColumnIndex := 1
oDCOCX_Exontrol1:MarkSearchColumn := false
oDCOCX_Exontrol1:SearchColumnIndex := 1
oDCOCX_Exontrol1:FilterBarPromptVisible := exFilterBarPromptVisible
oDCOCX_Exontrol1:FilterBarPromptType := exFilterPromptWords | exFilterPromptContainsAny
oDCOCX_Exontrol1:FilterBarPromptPattern := "london nancy"
var_Columns := oDCOCX_Exontrol1:Columns
IColumn{var_Columns:Add("Name")}:Width := 96
IColumn{var_Columns:Add("Title")}:Width := 96
var_Columns:Add("City")
var_Items := oDCOCX_Exontrol1:Items
h0 := var_Items:AddItem("Nancy Davolio")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Andrew Fuller")
var_Items:[CellValue,h0,1] := "Vice President, Sales"
var_Items:[CellValue,h0,2] := "Tacoma"
var_Items:[SelectItem,h0] := true
h0 := var_Items:AddItem("Janet Leverling")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Kirkland"
h0 := var_Items:AddItem("Margaret Peacock")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Redmond"
h0 := var_Items:AddItem("Steven Buchanan")
var_Items:[CellValue,h0,1] := "Sales Manager"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Michael Suyama")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Robert King")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Laura Callahan")
var_Items:[CellValue,h0,1] := "Inside Sales Coordinator"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Anne Dodsworth")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
oDCOCX_Exontrol1:EndUpdate()
|
630
|
How can I list all items that contains all specified words, not strings

local var_Columns as IColumns
local var_Items as IItems
local h0 as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := true
oDCOCX_Exontrol1:ContinueColumnScroll := false
oDCOCX_Exontrol1:FocusColumnIndex := 1
oDCOCX_Exontrol1:MarkSearchColumn := false
oDCOCX_Exontrol1:SearchColumnIndex := 1
oDCOCX_Exontrol1:FilterBarPromptVisible := exFilterBarPromptVisible
oDCOCX_Exontrol1:FilterBarPromptType := exFilterPromptWords | exFilterPromptContainsAll
oDCOCX_Exontrol1:FilterBarPromptPattern := "london robert"
var_Columns := oDCOCX_Exontrol1:Columns
IColumn{var_Columns:Add("Name")}:Width := 96
IColumn{var_Columns:Add("Title")}:Width := 96
var_Columns:Add("City")
var_Items := oDCOCX_Exontrol1:Items
h0 := var_Items:AddItem("Nancy Davolio")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Andrew Fuller")
var_Items:[CellValue,h0,1] := "Vice President, Sales"
var_Items:[CellValue,h0,2] := "Tacoma"
var_Items:[SelectItem,h0] := true
h0 := var_Items:AddItem("Janet Leverling")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Kirkland"
h0 := var_Items:AddItem("Margaret Peacock")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Redmond"
h0 := var_Items:AddItem("Steven Buchanan")
var_Items:[CellValue,h0,1] := "Sales Manager"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Michael Suyama")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Robert King")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Laura Callahan")
var_Items:[CellValue,h0,1] := "Inside Sales Coordinator"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Anne Dodsworth")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
oDCOCX_Exontrol1:EndUpdate()
|
629
|
I've noticed that the filtering by prompt is not case sensitive, is is possible to make it case sensitive

local var_Columns as IColumns
local var_Items as IItems
local h0 as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := true
oDCOCX_Exontrol1:ContinueColumnScroll := false
oDCOCX_Exontrol1:FocusColumnIndex := 1
oDCOCX_Exontrol1:MarkSearchColumn := false
oDCOCX_Exontrol1:SearchColumnIndex := 1
oDCOCX_Exontrol1:FilterBarPromptVisible := exFilterBarPromptVisible
oDCOCX_Exontrol1:FilterBarPromptType := exFilterPromptCaseSensitive | exFilterPromptContainsAny
oDCOCX_Exontrol1:FilterBarPromptPattern := "Anne"
var_Columns := oDCOCX_Exontrol1:Columns
IColumn{var_Columns:Add("Name")}:Width := 96
IColumn{var_Columns:Add("Title")}:Width := 96
var_Columns:Add("City")
var_Items := oDCOCX_Exontrol1:Items
h0 := var_Items:AddItem("Nancy Davolio")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Andrew Fuller")
var_Items:[CellValue,h0,1] := "Vice President, Sales"
var_Items:[CellValue,h0,2] := "Tacoma"
var_Items:[SelectItem,h0] := true
h0 := var_Items:AddItem("Janet Leverling")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Kirkland"
h0 := var_Items:AddItem("Margaret Peacock")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Redmond"
h0 := var_Items:AddItem("Steven Buchanan")
var_Items:[CellValue,h0,1] := "Sales Manager"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Michael Suyama")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Robert King")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Laura Callahan")
var_Items:[CellValue,h0,1] := "Inside Sales Coordinator"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Anne Dodsworth")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
oDCOCX_Exontrol1:EndUpdate()
|
628
|
Is it possible to list only items that ends with any of specified strings

local var_Columns as IColumns
local var_Items as IItems
local h0 as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := true
oDCOCX_Exontrol1:ContinueColumnScroll := false
oDCOCX_Exontrol1:FocusColumnIndex := 1
oDCOCX_Exontrol1:MarkSearchColumn := false
oDCOCX_Exontrol1:SearchColumnIndex := 1
oDCOCX_Exontrol1:FilterBarPromptVisible := exFilterBarPromptVisible
oDCOCX_Exontrol1:FilterBarPromptType := exFilterPromptEndWith
oDCOCX_Exontrol1:FilterBarPromptColumns := "0"
oDCOCX_Exontrol1:FilterBarPromptPattern := "Fuller"
var_Columns := oDCOCX_Exontrol1:Columns
IColumn{var_Columns:Add("Name")}:Width := 96
IColumn{var_Columns:Add("Title")}:Width := 96
var_Columns:Add("City")
var_Items := oDCOCX_Exontrol1:Items
h0 := var_Items:AddItem("Nancy Davolio")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Andrew Fuller")
var_Items:[CellValue,h0,1] := "Vice President, Sales"
var_Items:[CellValue,h0,2] := "Tacoma"
var_Items:[SelectItem,h0] := true
h0 := var_Items:AddItem("Janet Leverling")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Kirkland"
h0 := var_Items:AddItem("Margaret Peacock")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Redmond"
h0 := var_Items:AddItem("Steven Buchanan")
var_Items:[CellValue,h0,1] := "Sales Manager"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Michael Suyama")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Robert King")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Laura Callahan")
var_Items:[CellValue,h0,1] := "Inside Sales Coordinator"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Anne Dodsworth")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
oDCOCX_Exontrol1:EndUpdate()
|
627
|
Is it possible to list only items that ends with any of specified strings

local var_Columns as IColumns
local var_Items as IItems
local h0 as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := true
oDCOCX_Exontrol1:ContinueColumnScroll := false
oDCOCX_Exontrol1:FocusColumnIndex := 1
oDCOCX_Exontrol1:MarkSearchColumn := false
oDCOCX_Exontrol1:SearchColumnIndex := 1
oDCOCX_Exontrol1:FilterBarPromptVisible := exFilterBarPromptVisible
oDCOCX_Exontrol1:FilterBarPromptType := exFilterPromptEndWith
oDCOCX_Exontrol1:FilterBarPromptColumns := "0"
oDCOCX_Exontrol1:FilterBarPromptPattern := "Fuller"
var_Columns := oDCOCX_Exontrol1:Columns
IColumn{var_Columns:Add("Name")}:Width := 96
IColumn{var_Columns:Add("Title")}:Width := 96
var_Columns:Add("City")
var_Items := oDCOCX_Exontrol1:Items
h0 := var_Items:AddItem("Nancy Davolio")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Andrew Fuller")
var_Items:[CellValue,h0,1] := "Vice President, Sales"
var_Items:[CellValue,h0,2] := "Tacoma"
var_Items:[SelectItem,h0] := true
h0 := var_Items:AddItem("Janet Leverling")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Kirkland"
h0 := var_Items:AddItem("Margaret Peacock")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Redmond"
h0 := var_Items:AddItem("Steven Buchanan")
var_Items:[CellValue,h0,1] := "Sales Manager"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Michael Suyama")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Robert King")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Laura Callahan")
var_Items:[CellValue,h0,1] := "Inside Sales Coordinator"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Anne Dodsworth")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
oDCOCX_Exontrol1:EndUpdate()
|
626
|
Is it possible to list only items that starts with any of specified strings

local var_Columns as IColumns
local var_Items as IItems
local h0 as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := true
oDCOCX_Exontrol1:ContinueColumnScroll := false
oDCOCX_Exontrol1:FocusColumnIndex := 1
oDCOCX_Exontrol1:MarkSearchColumn := false
oDCOCX_Exontrol1:SearchColumnIndex := 1
oDCOCX_Exontrol1:FilterBarPromptVisible := exFilterBarPromptVisible
oDCOCX_Exontrol1:FilterBarPromptType := exFilterPromptStartWith
oDCOCX_Exontrol1:FilterBarPromptColumns := "0"
oDCOCX_Exontrol1:FilterBarPromptPattern := "An M"
var_Columns := oDCOCX_Exontrol1:Columns
IColumn{var_Columns:Add("Name")}:Width := 96
IColumn{var_Columns:Add("Title")}:Width := 96
var_Columns:Add("City")
var_Items := oDCOCX_Exontrol1:Items
h0 := var_Items:AddItem("Nancy Davolio")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Andrew Fuller")
var_Items:[CellValue,h0,1] := "Vice President, Sales"
var_Items:[CellValue,h0,2] := "Tacoma"
var_Items:[SelectItem,h0] := true
h0 := var_Items:AddItem("Janet Leverling")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Kirkland"
h0 := var_Items:AddItem("Margaret Peacock")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Redmond"
h0 := var_Items:AddItem("Steven Buchanan")
var_Items:[CellValue,h0,1] := "Sales Manager"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Michael Suyama")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Robert King")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Laura Callahan")
var_Items:[CellValue,h0,1] := "Inside Sales Coordinator"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Anne Dodsworth")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
oDCOCX_Exontrol1:EndUpdate()
|
625
|
Is it possible to list only items that starts with specified string

local var_Columns as IColumns
local var_Items as IItems
local h0 as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := true
oDCOCX_Exontrol1:ContinueColumnScroll := false
oDCOCX_Exontrol1:FocusColumnIndex := 1
oDCOCX_Exontrol1:MarkSearchColumn := false
oDCOCX_Exontrol1:SearchColumnIndex := 1
oDCOCX_Exontrol1:FilterBarPromptVisible := exFilterBarPromptVisible
oDCOCX_Exontrol1:FilterBarPromptType := exFilterPromptStartWith
oDCOCX_Exontrol1:FilterBarPromptColumns := "0"
oDCOCX_Exontrol1:FilterBarPromptPattern := "A"
var_Columns := oDCOCX_Exontrol1:Columns
IColumn{var_Columns:Add("Name")}:Width := 96
IColumn{var_Columns:Add("Title")}:Width := 96
var_Columns:Add("City")
var_Items := oDCOCX_Exontrol1:Items
h0 := var_Items:AddItem("Nancy Davolio")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Andrew Fuller")
var_Items:[CellValue,h0,1] := "Vice President, Sales"
var_Items:[CellValue,h0,2] := "Tacoma"
var_Items:[SelectItem,h0] := true
h0 := var_Items:AddItem("Janet Leverling")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Kirkland"
h0 := var_Items:AddItem("Margaret Peacock")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Redmond"
h0 := var_Items:AddItem("Steven Buchanan")
var_Items:[CellValue,h0,1] := "Sales Manager"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Michael Suyama")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Robert King")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Laura Callahan")
var_Items:[CellValue,h0,1] := "Inside Sales Coordinator"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Anne Dodsworth")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
oDCOCX_Exontrol1:EndUpdate()
|
624
|
How can I specify that the list should include any of the seqeunces in the pattern

local var_Columns as IColumns
local var_Items as IItems
local h0 as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := true
oDCOCX_Exontrol1:ContinueColumnScroll := false
oDCOCX_Exontrol1:FocusColumnIndex := 1
oDCOCX_Exontrol1:MarkSearchColumn := false
oDCOCX_Exontrol1:SearchColumnIndex := 1
oDCOCX_Exontrol1:FilterBarPromptVisible := exFilterBarPromptVisible
oDCOCX_Exontrol1:FilterBarPromptType := exFilterPromptContainsAny
oDCOCX_Exontrol1:FilterBarPromptPattern := "london seattle"
var_Columns := oDCOCX_Exontrol1:Columns
IColumn{var_Columns:Add("Name")}:Width := 96
IColumn{var_Columns:Add("Title")}:Width := 96
var_Columns:Add("City")
var_Items := oDCOCX_Exontrol1:Items
h0 := var_Items:AddItem("Nancy Davolio")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Andrew Fuller")
var_Items:[CellValue,h0,1] := "Vice President, Sales"
var_Items:[CellValue,h0,2] := "Tacoma"
var_Items:[SelectItem,h0] := true
h0 := var_Items:AddItem("Janet Leverling")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Kirkland"
h0 := var_Items:AddItem("Margaret Peacock")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Redmond"
h0 := var_Items:AddItem("Steven Buchanan")
var_Items:[CellValue,h0,1] := "Sales Manager"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Michael Suyama")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Robert King")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Laura Callahan")
var_Items:[CellValue,h0,1] := "Inside Sales Coordinator"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Anne Dodsworth")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
oDCOCX_Exontrol1:EndUpdate()
|
623
|
How can I specify that all sequences in the filter pattern must be included in the list

local var_Columns as IColumns
local var_Items as IItems
local h0 as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := true
oDCOCX_Exontrol1:ContinueColumnScroll := false
oDCOCX_Exontrol1:FocusColumnIndex := 1
oDCOCX_Exontrol1:MarkSearchColumn := false
oDCOCX_Exontrol1:SearchColumnIndex := 1
oDCOCX_Exontrol1:FilterBarPromptVisible := exFilterBarPromptVisible
oDCOCX_Exontrol1:FilterBarPromptType := exFilterPromptContainsAll
oDCOCX_Exontrol1:FilterBarPromptPattern := "london manager"
var_Columns := oDCOCX_Exontrol1:Columns
IColumn{var_Columns:Add("Name")}:Width := 96
IColumn{var_Columns:Add("Title")}:Width := 96
var_Columns:Add("City")
var_Items := oDCOCX_Exontrol1:Items
h0 := var_Items:AddItem("Nancy Davolio")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Andrew Fuller")
var_Items:[CellValue,h0,1] := "Vice President, Sales"
var_Items:[CellValue,h0,2] := "Tacoma"
var_Items:[SelectItem,h0] := true
h0 := var_Items:AddItem("Janet Leverling")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Kirkland"
h0 := var_Items:AddItem("Margaret Peacock")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Redmond"
h0 := var_Items:AddItem("Steven Buchanan")
var_Items:[CellValue,h0,1] := "Sales Manager"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Michael Suyama")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Robert King")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Laura Callahan")
var_Items:[CellValue,h0,1] := "Inside Sales Coordinator"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Anne Dodsworth")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
oDCOCX_Exontrol1:EndUpdate()
|
622
|
How do I change at runtime the filter prompt

local var_Columns as IColumns
local var_Items as IItems
local h0 as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := true
oDCOCX_Exontrol1:ContinueColumnScroll := false
oDCOCX_Exontrol1:FocusColumnIndex := 1
oDCOCX_Exontrol1:MarkSearchColumn := false
oDCOCX_Exontrol1:SearchColumnIndex := 1
oDCOCX_Exontrol1:FilterBarPromptVisible := exFilterBarPromptVisible
oDCOCX_Exontrol1:FilterBarPromptPattern := "london manager"
var_Columns := oDCOCX_Exontrol1:Columns
IColumn{var_Columns:Add("Name")}:Width := 96
IColumn{var_Columns:Add("Title")}:Width := 96
var_Columns:Add("City")
var_Items := oDCOCX_Exontrol1:Items
h0 := var_Items:AddItem("Nancy Davolio")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Andrew Fuller")
var_Items:[CellValue,h0,1] := "Vice President, Sales"
var_Items:[CellValue,h0,2] := "Tacoma"
var_Items:[SelectItem,h0] := true
h0 := var_Items:AddItem("Janet Leverling")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Kirkland"
h0 := var_Items:AddItem("Margaret Peacock")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Redmond"
h0 := var_Items:AddItem("Steven Buchanan")
var_Items:[CellValue,h0,1] := "Sales Manager"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Michael Suyama")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Robert King")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Laura Callahan")
var_Items:[CellValue,h0,1] := "Inside Sales Coordinator"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Anne Dodsworth")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
oDCOCX_Exontrol1:EndUpdate()
|
621
|
How do I specify to filter only a single column when using the filter prompt

local var_Columns as IColumns
local var_Items as IItems
local h0 as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := true
oDCOCX_Exontrol1:ContinueColumnScroll := false
oDCOCX_Exontrol1:FocusColumnIndex := 1
oDCOCX_Exontrol1:MarkSearchColumn := false
oDCOCX_Exontrol1:SearchColumnIndex := 1
oDCOCX_Exontrol1:FilterBarPromptVisible := exFilterBarPromptVisible
oDCOCX_Exontrol1:FilterBarPromptColumns := "2,3"
oDCOCX_Exontrol1:FilterBarPromptPattern := "london"
var_Columns := oDCOCX_Exontrol1:Columns
IColumn{var_Columns:Add("Name")}:Width := 96
IColumn{var_Columns:Add("Title")}:Width := 96
var_Columns:Add("City")
var_Items := oDCOCX_Exontrol1:Items
h0 := var_Items:AddItem("Nancy Davolio")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Andrew Fuller")
var_Items:[CellValue,h0,1] := "Vice President, Sales"
var_Items:[CellValue,h0,2] := "Tacoma"
var_Items:[SelectItem,h0] := true
h0 := var_Items:AddItem("Janet Leverling")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Kirkland"
h0 := var_Items:AddItem("Margaret Peacock")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Redmond"
h0 := var_Items:AddItem("Steven Buchanan")
var_Items:[CellValue,h0,1] := "Sales Manager"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Michael Suyama")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Robert King")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Laura Callahan")
var_Items:[CellValue,h0,1] := "Inside Sales Coordinator"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Anne Dodsworth")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
oDCOCX_Exontrol1:EndUpdate()
|
620
|
How do I change the prompt or the caption being displayed in the filter bar

local var_Columns as IColumns
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := true
oDCOCX_Exontrol1:ContinueColumnScroll := false
oDCOCX_Exontrol1:FocusColumnIndex := 1
oDCOCX_Exontrol1:MarkSearchColumn := false
oDCOCX_Exontrol1:SearchColumnIndex := 1
oDCOCX_Exontrol1:FilterBarPromptVisible := exFilterBarPromptVisible
oDCOCX_Exontrol1:FilterBarPrompt := "changed"
var_Columns := oDCOCX_Exontrol1:Columns
IColumn{var_Columns:Add("Name")}:Width := 96
IColumn{var_Columns:Add("Title")}:Width := 96
var_Columns:Add("City")
oDCOCX_Exontrol1:EndUpdate()
|
619
|
How do I enable the filter prompt feature

local var_Columns as IColumns
local var_Items as IItems
local h0 as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := true
oDCOCX_Exontrol1:ContinueColumnScroll := false
oDCOCX_Exontrol1:FocusColumnIndex := 1
oDCOCX_Exontrol1:MarkSearchColumn := false
oDCOCX_Exontrol1:SearchColumnIndex := 1
oDCOCX_Exontrol1:FilterBarPromptVisible := exFilterBarPromptVisible
var_Columns := oDCOCX_Exontrol1:Columns
IColumn{var_Columns:Add("Name")}:Width := 96
IColumn{var_Columns:Add("Title")}:Width := 96
var_Columns:Add("City")
var_Items := oDCOCX_Exontrol1:Items
h0 := var_Items:AddItem("Nancy Davolio")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Andrew Fuller")
var_Items:[CellValue,h0,1] := "Vice President, Sales"
var_Items:[CellValue,h0,2] := "Tacoma"
var_Items:[SelectItem,h0] := true
h0 := var_Items:AddItem("Janet Leverling")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Kirkland"
h0 := var_Items:AddItem("Margaret Peacock")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "Redmond"
h0 := var_Items:AddItem("Steven Buchanan")
var_Items:[CellValue,h0,1] := "Sales Manager"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Michael Suyama")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Robert King")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
h0 := var_Items:AddItem("Laura Callahan")
var_Items:[CellValue,h0,1] := "Inside Sales Coordinator"
var_Items:[CellValue,h0,2] := "Seattle"
h0 := var_Items:AddItem("Anne Dodsworth")
var_Items:[CellValue,h0,1] := "Sales Representative"
var_Items:[CellValue,h0,2] := "London"
oDCOCX_Exontrol1:EndUpdate()
|
618
|
How can I control the colors that can be applied to an EBN part

METHOD OCX_Exontrol1Change(Item,ColIndex,NewValue) CLASS MainDialog
// Change event - Occurs when the user changes the cell's content.
local var_Items as IItems
var_Items := oDCOCX_Exontrol1:Items
var_Items:[ItemBackColor,var_Items:FirstVisibleItem] := NewValue
RETURN NIL
local var_Appearance as IAppearance
local var_Column,var_Column1 as IColumn
local var_Columns as IColumns
local var_Editor as IEditor
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
var_Appearance := oDCOCX_Exontrol1:VisualAppearance
var_Appearance:Add(2,"c:\exontrol\images\normal.ebn")
var_Appearance:Add(1,"CP:2 10 3 -10 -5")
oDCOCX_Exontrol1:SelBackColor := oDCOCX_Exontrol1:BackColor
oDCOCX_Exontrol1:SelForeColor := oDCOCX_Exontrol1:ForeColor
oDCOCX_Exontrol1:ScrollBySingleLine := true
oDCOCX_Exontrol1:TreeColumnIndex := -1
var_Columns := oDCOCX_Exontrol1:Columns
var_Column := IColumn{var_Columns:Add("Test")}
var_Column:Width := 32
var_Column1 := IColumn{var_Columns:Add("RGB")}
var_Editor := var_Column1:Editor
var_Editor:EditType := SliderType
var_Editor:[Option,exSliderMax] := 255
var_Editor:[Option,exSliderWidth] := -60
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("")
var_Items:[CellHAlignment,h,0] := CenterAlignment
var_Items:[ItemDivider,h] := 0
var_Items:[ItemBackColor,h] := 0x1000000
var_Items:[ItemHeight,h] := 36
var_Items:[SelectableItem,h] := false
h := var_Items:InsertItem(0,1,"Red")
var_Items:[CellValue,h,1] := 255
h := var_Items:InsertItem(0,255,"Green")
var_Items:[CellValue,h,1] := 255
h := var_Items:InsertItem(0,65536,"Blue")
var_Items:[CellValue,h,1] := 255
oDCOCX_Exontrol1:EndUpdate()
|
617
|
I know this is fairly basic, but could you send me a sample that places a tree in the first column

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:Columns:Add("heading")
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Parent 1")
var_Items:InsertItem(h,nil,"Child A")
var_Items:InsertItem(var_Items:InsertItem(h,nil,"Child B"),nil,"GrandChild C")
var_Items:[ExpandItem,h] := true
h := var_Items:AddItem("Parent 2")
var_Items:InsertItem(h,nil,"Child D")
var_Items:InsertItem(h,nil,"Child E")
var_Items:[ExpandItem,h] := true
oDCOCX_Exontrol1:EndUpdate()
|
616
|
How can I get the caption of focused item
METHOD OCX_Exontrol1SelectionChanged() CLASS MainDialog
// SelectionChanged event - Fired after a new item has been selected.
local var_Items as IItems
var_Items := oDCOCX_Exontrol1:Items
OutputDebugString(String2Psz( "Handle" ))
OutputDebugString(String2Psz( AsString(var_Items:FocusItem) ))
OutputDebugString(String2Psz( "Caption" ))
OutputDebugString(String2Psz( var_Items:[CellCaption,var_Items:FocusItem,0] ))
RETURN NIL
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:Columns:Add("Items")
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("R1")
var_Items:InsertItem(h,nil,"Cell 1.1")
var_Items:InsertItem(h,nil,"Cell 1.2")
var_Items:[ExpandItem,h] := true
h := var_Items:AddItem("R2")
var_Items:InsertItem(h,nil,"Cell 2.1")
var_Items:InsertItem(h,nil,"Cell 2.2")
var_Items:[ExpandItem,h] := true
oDCOCX_Exontrol1:EndUpdate()
|
615
|
How can I get the caption of selected item
METHOD OCX_Exontrol1SelectionChanged() CLASS MainDialog
// SelectionChanged event - Fired after a new item has been selected.
local var_Items as IItems
var_Items := oDCOCX_Exontrol1:Items
OutputDebugString(String2Psz( "Handle" ))
OutputDebugString(String2Psz( AsString(var_Items:[SelectedItem,0]) ))
OutputDebugString(String2Psz( "Caption" ))
OutputDebugString(String2Psz( var_Items:[CellCaption,var_Items:[SelectedItem,0],0] ))
RETURN NIL
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:Columns:Add("Items")
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("R1")
var_Items:InsertItem(h,nil,"Cell 1.1")
var_Items:InsertItem(h,nil,"Cell 1.2")
var_Items:[ExpandItem,h] := true
h := var_Items:AddItem("R2")
var_Items:InsertItem(h,nil,"Cell 2.1")
var_Items:InsertItem(h,nil,"Cell 2.2")
var_Items:[ExpandItem,h] := true
oDCOCX_Exontrol1:EndUpdate()
|
614
|
Is it possible to let users selects cells as in Excel

local var_Column,var_Column1,var_Column2 as IColumn
local var_Columns as IColumns
local var_Items as IItems
local h,h1 as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:FullRowSelect := exRectSel
oDCOCX_Exontrol1:SingleSel := false
oDCOCX_Exontrol1:ReadOnly := exReadOnly
oDCOCX_Exontrol1:MarkSearchColumn := false
oDCOCX_Exontrol1:ShowFocusRect := false
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:SelForeColor := RGB(0,0,0)
oDCOCX_Exontrol1:SelBackColor := RGB(200,225,242)
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("A")
var_Column := IColumn{var_Columns:Add("B")}
var_Column:AllowSizing := false
var_Column:Width := 24
var_Column1 := IColumn{var_Columns:Add("C")}
var_Column1:AllowSizing := false
var_Column1:Width := 24
var_Column1:[Def,exCellHasCheckBox] := 1
var_Column1:PartialCheck := true
var_Column2 := IColumn{var_Columns:Add("D")}
var_Column2:AllowSizing := false
var_Column2:Width := 24
var_Column2:[Def,exCellHasRadioButton] := 1
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:InsertItem(nil,nil,"Group 1")
h1 := var_Items:InsertItem(h,nil,16)
var_Items:[CellValue,h1,1] := 17
h1 := var_Items:InsertItem(h,nil,2)
var_Items:[CellValue,h1,1] := 11
h1 := var_Items:InsertItem(h,nil,2)
var_Items:[ItemBackColor,h1] := RGB(240,240,240)
var_Items:[CellValue,h1,1] := 9
var_Items:[ExpandItem,h] := true
h := var_Items:InsertItem(nil,nil,"Group 2")
var_Items:[CellValueFormat,h,2] := exHTML
h1 := var_Items:InsertItem(h,nil,16)
var_Items:[CellValue,h1,1] := 9
h1 := var_Items:InsertItem(h,nil,12)
var_Items:[CellValue,h1,1] := 11
h1 := var_Items:InsertItem(h,nil,2)
var_Items:[CellValue,h1,1] := 2
var_Items:[ExpandItem,h] := true
var_Items:[SelectItem,h] := true
oDCOCX_Exontrol1:EndUpdate()
|
613
|
Is it possible to change the style for the vertical or horizontal grid lines, in the list area

local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:DrawGridLines := exAllLines
oDCOCX_Exontrol1:GridLineStyle := exGridLinesVSolid | exGridLinesHDot4
oDCOCX_Exontrol1:Columns:Add("C1")
oDCOCX_Exontrol1:Columns:Add("C2")
oDCOCX_Exontrol1:Columns:Add("C3")
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Item 1")
var_Items:[CellValue,h,1] := "SubItem 1.2"
var_Items:[CellValue,h,2] := "SubItem 1.3"
h := var_Items:AddItem("Item 2")
var_Items:[CellValue,h,1] := "SubItem 2.2"
var_Items:[CellValue,h,2] := "SubItem 2.3"
oDCOCX_Exontrol1:EndUpdate()
|
612
|
Is it possible to change the style for the grid lines, for instance to be solid not dotted

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:DrawGridLines := exAllLines
oDCOCX_Exontrol1:GridLineStyle := exGridLinesSolid
oDCOCX_Exontrol1:Columns:Add("Column")
oDCOCX_Exontrol1:EndUpdate()
|
611
|
I have some buttons added on the control's scroll bar, how can I can know when the button is being clicked

METHOD OCX_Exontrol1ScrollButtonClick(ScrollBar,ScrollPart) CLASS MainDialog
// ScrollButtonClick event - Occurs when the user clicks a button in the scrollbar.
OutputDebugString(String2Psz( AsString(ScrollBar) ))
OutputDebugString(String2Psz( AsString(ScrollPart) ))
RETURN NIL
oDCOCX_Exontrol1:[ScrollPartVisible,exHScroll,exLeftB1Part] := true
oDCOCX_Exontrol1:[ScrollPartVisible,exHScroll,exLeftB2Part] := true
oDCOCX_Exontrol1:[ScrollPartVisible,exHScroll,exRightB6Part] := true
oDCOCX_Exontrol1:[ScrollPartVisible,exHScroll,exRightB5Part] := true
oDCOCX_Exontrol1:ScrollBars := exDisableNoHorizontal
|
610
|
How do I get notified once the user clicks a hyperlink created using the anchor HTML tag

METHOD OCX_Exontrol1AnchorClick(AnchorID,Options) CLASS MainDialog
// AnchorClick event - Occurs when an anchor element is clicked.
OutputDebugString(String2Psz( AsString(AnchorID) ))
OutputDebugString(String2Psz( AsString(Options) ))
RETURN NIL
local var_Items as IItems
IColumn{oDCOCX_Exontrol1:Columns:Add("Default")}:[Def,exCellValueFormat] := 1
var_Items := oDCOCX_Exontrol1:Items
var_Items:AddItem("This is a link: <aex.com;1>www.exontrol.com</a>")
var_Items:AddItem("This is a link: <aex.net;2>www.exontrol.net</a>")
|
609
|
Is it possible to start editing a cell when double click it

METHOD OCX_Exontrol1DblClick(Shift,X,Y) CLASS MainDialog
// DblClick event - Occurs when the user dblclk the left mouse button over an object.
oDCOCX_Exontrol1:Edit(nil)
RETURN NIL
local var_Items,var_Items1 as IItems
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:AutoEdit := false
oDCOCX_Exontrol1:MarkSearchColumn := false
IColumn{oDCOCX_Exontrol1:Columns:Add("Edit1")}:Editor:EditType := EditType
IColumn{oDCOCX_Exontrol1:Columns:Add("Edit2")}:Editor:EditType := EditType
var_Items := oDCOCX_Exontrol1:Items
var_Items:[CellValue,var_Items:AddItem(1),1] := 2
var_Items1 := oDCOCX_Exontrol1:Items
var_Items1:[CellValue,var_Items1:AddItem(3),1] := 4
oDCOCX_Exontrol1:EndUpdate()
|
608
|
Is it possible to disable standard single-click behavior for this column, so I manually could call Edit() when needed

METHOD OCX_Exontrol1DblClick(Shift,X,Y) CLASS MainDialog
// DblClick event - Occurs when the user dblclk the left mouse button over an object.
oDCOCX_Exontrol1:Edit(nil)
RETURN NIL
local var_Items,var_Items1 as IItems
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:AutoEdit := false
oDCOCX_Exontrol1:MarkSearchColumn := false
IColumn{oDCOCX_Exontrol1:Columns:Add("Edit1")}:Editor:EditType := EditType
IColumn{oDCOCX_Exontrol1:Columns:Add("Edit2")}:Editor:EditType := EditType
var_Items := oDCOCX_Exontrol1:Items
var_Items:[CellValue,var_Items:AddItem(1),1] := 2
var_Items1 := oDCOCX_Exontrol1:Items
var_Items1:[CellValue,var_Items1:AddItem(3),1] := 4
oDCOCX_Exontrol1:EndUpdate()
|
607
|
How can I get or restore the old or previously value for the cell being changed
METHOD OCX_Exontrol1Change(Item,ColIndex,NewValue) CLASS MainDialog
// Change event - Occurs when the user changes the cell's content.
OutputDebugString(String2Psz( "Old-Value:" ))
OutputDebugString(String2Psz( AsString(oDCOCX_Exontrol1:Items:[CellValue,Item,ColIndex]) ))
OutputDebugString(String2Psz( "New-Value:" ))
OutputDebugString(String2Psz( AsString(NewValue) ))
RETURN NIL
local var_Items,var_Items1 as IItems
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:MarkSearchColumn := false
IColumn{oDCOCX_Exontrol1:Columns:Add("Edit1")}:Editor:EditType := EditType
IColumn{oDCOCX_Exontrol1:Columns:Add("Edit2")}:Editor:EditType := EditType
var_Items := oDCOCX_Exontrol1:Items
var_Items:[CellValue,var_Items:AddItem(1),1] := 2
var_Items1 := oDCOCX_Exontrol1:Items
var_Items1:[CellValue,var_Items1:AddItem(3),1] := 4
oDCOCX_Exontrol1:EndUpdate()
|
606
|
How can I get the item from the cursor
METHOD OCX_Exontrol1MouseMove(Button,Shift,X,Y) CLASS MainDialog
// MouseMove event - Occurs when the user moves the mouse.
local h as USUAL
h := oDCOCX_Exontrol1:[ItemFromPoint,-1,-1,c,hit]
OutputDebugString(String2Psz( "Handle" ))
OutputDebugString(String2Psz( AsString(h) ))
OutputDebugString(String2Psz( "Index" ))
OutputDebugString(String2Psz( AsString(oDCOCX_Exontrol1:Items:[ItemToIndex,h]) ))
RETURN NIL
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:DrawGridLines := exHLines
oDCOCX_Exontrol1:Columns:Add("Items")
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("R1")
var_Items:InsertItem(h,nil,"Cell 1.1")
var_Items:InsertItem(h,nil,"Cell 1.2")
var_Items:[ExpandItem,h] := true
h := var_Items:AddItem("R2")
var_Items:InsertItem(h,nil,"Cell 2.1")
var_Items:InsertItem(h,nil,"Cell 2.2")
var_Items:[ExpandItem,h] := true
oDCOCX_Exontrol1:EndUpdate()
|
605
|
How can I get the column from the cursor, not only in the header

METHOD OCX_Exontrol1MouseMove(Button,Shift,X,Y) CLASS MainDialog
// MouseMove event - Occurs when the user moves the mouse.
OutputDebugString(String2Psz( AsString(oDCOCX_Exontrol1:[ColumnFromPoint,-1,0]) ))
RETURN NIL
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:Columns:Add("P1")
oDCOCX_Exontrol1:Columns:Add("P2")
oDCOCX_Exontrol1:DrawGridLines := exAllLines
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("R1")
var_Items:[CellValue,h,1] := "R2"
var_Items:[CellValue,var_Items:InsertItem(h,nil,"Cell 1.1"),1] := "Cell 1.2"
var_Items:[CellValue,var_Items:InsertItem(h,nil,"Cell 2.1"),1] := "Cell 2.2"
var_Items:[ExpandItem,h] := true
oDCOCX_Exontrol1:EndUpdate()
|
604
|
How can I get the column from the cursor

METHOD OCX_Exontrol1MouseMove(Button,Shift,X,Y) CLASS MainDialog
// MouseMove event - Occurs when the user moves the mouse.
OutputDebugString(String2Psz( AsString(oDCOCX_Exontrol1:[ColumnFromPoint,-1,-1]) ))
RETURN NIL
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:DrawGridLines := exAllLines
oDCOCX_Exontrol1:Columns:Add("P1")
oDCOCX_Exontrol1:Columns:Add("P2")
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("R1")
var_Items:[CellValue,h,1] := "R2"
var_Items:[CellValue,var_Items:InsertItem(h,nil,"Cell 1.1"),1] := "Cell 1.2"
var_Items:[CellValue,var_Items:InsertItem(h,nil,"Cell 2.1"),1] := "Cell 2.2"
var_Items:[ExpandItem,h] := true
oDCOCX_Exontrol1:EndUpdate()
|
603
|
How can I get the cell's caption from the cursor
METHOD OCX_Exontrol1MouseMove(Button,Shift,X,Y) CLASS MainDialog
// MouseMove event - Occurs when the user moves the mouse.
local h as USUAL
h := oDCOCX_Exontrol1:[ItemFromPoint,-1,-1,c,hit]
OutputDebugString(String2Psz( oDCOCX_Exontrol1:Items:[CellCaption,h,c] ))
RETURN NIL
local var_Items as IItems
local h as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:Columns:Add("Items")
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("R1")
var_Items:InsertItem(h,nil,"Cell 1.1")
var_Items:InsertItem(h,nil,"Cell 1.2")
var_Items:[ExpandItem,h] := true
h := var_Items:AddItem("R2")
var_Items:InsertItem(h,nil,"Cell 2.1")
var_Items:InsertItem(h,nil,"Cell 2.2")
var_Items:[ExpandItem,h] := true
oDCOCX_Exontrol1:EndUpdate()
|
602
|
How can I customize the items based on the values in the cells

local var_Column,var_Column1,var_Column2,var_Column3 as IColumn
local var_Columns as IColumns
local var_ConditionalFormat,var_ConditionalFormat1,var_ConditionalFormat2 as IConditionalFormat
local var_ConditionalFormats as IConditionalFormats
local var_Items as IItems
local h,h1 as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:MarkSearchColumn := false
var_ConditionalFormats := oDCOCX_Exontrol1:ConditionalFormats
var_ConditionalFormat := var_ConditionalFormats:Add("%1 >4",nil)
var_ConditionalFormat:Bold := true
var_ConditionalFormat:StrikeOut := true
var_ConditionalFormat:ForeColor := RGB(255,0,0)
var_ConditionalFormat:ApplyTo := exFormatToItems
var_ConditionalFormat1 := var_ConditionalFormats:Add("%2 > 4",nil)
var_ConditionalFormat1:Bold := true
var_ConditionalFormat1:StrikeOut := true
var_ConditionalFormat1:ForeColor := RGB(255,0,0)
var_ConditionalFormat1:ApplyTo := 0x2 |
var_ConditionalFormat2 := var_ConditionalFormats:Add("%3 > 4",nil)
var_ConditionalFormat2:Bold := true
var_ConditionalFormat2:StrikeOut := true
var_ConditionalFormat2:ForeColor := RGB(255,0,0)
var_ConditionalFormat2:ApplyTo := 0x3 |
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("Name")
var_Column := IColumn{var_Columns:Add("A")}
var_Column:SortType := SortNumeric
var_Column:AllowSizing := false
var_Column:Width := 36
var_Column:FormatColumn := "len(value) ? value + ' +'"
var_Column:Editor:EditType := SpinType
var_Column1 := IColumn{var_Columns:Add("B")}
var_Column1:SortType := SortNumeric
var_Column1:AllowSizing := false
var_Column1:Width := 36
var_Column1:FormatColumn := "len(value) ? value + ' +'"
var_Column1:Editor:EditType := SpinType
var_Column2 := IColumn{var_Columns:Add("C")}
var_Column2:SortType := SortNumeric
var_Column2:AllowSizing := false
var_Column2:Width := 36
var_Column2:FormatColumn := "len(value) ? value + ' ='"
var_Column2:Editor:EditType := SpinType
var_Column3 := IColumn{var_Columns:Add("A+B+C")}
var_Column3:SortType := SortNumeric
var_Column3:AllowSizing := false
var_Column3:Width := 64
var_Column3:ComputedField := "%1+%2+%3"
var_Column3:FormatColumn := "((0:=dbl(value)) < 10? '<fgcolor=808080><font ;7>' :'<b>') + currency(=:0)"
var_Column3:[Def,exCellValueFormat] := 1
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Root")
var_Items:[CellValueFormat,h,4] := exComputedField
h1 := var_Items:InsertItem(h,nil,"Child 1")
var_Items:[CellValue,h1,1] := 7
var_Items:[CellValue,h1,2] := 3
var_Items:[CellValue,h1,3] := 1
h1 := var_Items:InsertItem(h,nil,"Child 2")
var_Items:[CellValue,h1,1] := 2
var_Items:[CellValue,h1,2] := 5
var_Items:[CellValue,h1,3] := 12
h1 := var_Items:InsertItem(h,nil,"Child 3")
var_Items:[CellValue,h1,1] := 2
var_Items:[CellValue,h1,2] := 2
var_Items:[CellValue,h1,3] := 4
h1 := var_Items:InsertItem(h,nil,"Child 4")
var_Items:[CellValue,h1,1] := 2
var_Items:[CellValue,h1,2] := 9
var_Items:[CellValue,h1,3] := 4
var_Items:[ExpandItem,h] := true
oDCOCX_Exontrol1:EndUpdate()
|
601
|
Is it is possible to have a column computing values from other columns

local var_Column,var_Column1,var_Column2,var_Column3 as IColumn
local var_Columns as IColumns
local var_Items as IItems
local h,h1 as USUAL
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:MarkSearchColumn := false
var_Columns := oDCOCX_Exontrol1:Columns
var_Columns:Add("Name")
var_Column := IColumn{var_Columns:Add("A")}
var_Column:SortType := SortNumeric
var_Column:AllowSizing := false
var_Column:Width := 36
var_Column:FormatColumn := "len(value) ? value + ' +'"
var_Column:Editor:EditType := SpinType
var_Column1 := IColumn{var_Columns:Add("B")}
var_Column1:SortType := SortNumeric
var_Column1:AllowSizing := false
var_Column1:Width := 36
var_Column1:FormatColumn := "len(value) ? value + ' +'"
var_Column1:Editor:EditType := SpinType
var_Column2 := IColumn{var_Columns:Add("C")}
var_Column2:SortType := SortNumeric
var_Column2:AllowSizing := false
var_Column2:Width := 36
var_Column2:FormatColumn := "len(value) ? value + ' ='"
var_Column2:Editor:EditType := SpinType
var_Column3 := IColumn{var_Columns:Add("A+B+C")}
var_Column3:SortType := SortNumeric
var_Column3:AllowSizing := false
var_Column3:Width := 64
var_Column3:ComputedField := "%1+%2+%3"
var_Column3:FormatColumn := "((0:=dbl(value)) < 10? '<fgcolor=808080><font ;7>' :'<b>') + currency(=:0)"
var_Column3:[Def,exCellValueFormat] := 1
var_Items := oDCOCX_Exontrol1:Items
h := var_Items:AddItem("Root")
var_Items:[CellValueFormat,h,4] := exComputedField
h1 := var_Items:InsertItem(h,nil,"Child 1")
var_Items:[CellValue,h1,1] := 7
var_Items:[CellValue,h1,2] := 3
var_Items:[CellValue,h1,3] := 1
h1 := var_Items:InsertItem(h,nil,"Child 2")
var_Items:[CellValue,h1,1] := 2
var_Items:[CellValue,h1,2] := 5
var_Items:[CellValue,h1,3] := 12
h1 := var_Items:InsertItem(h,nil,"Child 3")
var_Items:[CellValue,h1,1] := 2
var_Items:[CellValue,h1,2] := 2
var_Items:[CellValue,h1,3] := 4
h1 := var_Items:InsertItem(h,nil,"Child 4")
var_Items:[CellValue,h1,1] := 2
var_Items:[CellValue,h1,2] := 9
var_Items:[CellValue,h1,3] := 4
var_Items:[ExpandItem,h] := true
oDCOCX_Exontrol1:EndUpdate()
|